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