@ -75,11 +75,12 @@ class Photography(Bureau):
time.sleep(2)
killer_cmd = "killall -s SIGINT mjpg_streamer"
subprocess.Popen(killer_cmd.split())
time.sleep(1)
# copy last image to the tmpfile
filelist = os.listdir("/tmp/webcam")
newest = max(filelist, key=lambda x: os.stat(x).st_mtime)
newest = os.path.join("/tmp/webcam", newest)
shutil.copyfile(newest, tmpimg.name)
self._doc_light_off()