@ -79,8 +79,9 @@ class Photography(Bureau):
# copy last image to the tmpfile
filelist = os.listdir("/tmp/webcam")
for i, f in enumerate(filelist):
filelist[i] = os.path.join("/tmp/webcam", f)
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()