diff --git a/screenless/bureau/photography/photography.py b/screenless/bureau/photography/photography.py index 305b825..5778d80 100644 --- a/screenless/bureau/photography/photography.py +++ b/screenless/bureau/photography/photography.py @@ -75,11 +75,12 @@ class Photography(Bureau): time.sleep(2) killer_cmd = "killall -s SIGINT mjpg_streamer" subprocess.Popen(killer_cmd.split()) - time.sleep(2) + 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()