tweaks for new camera

workspace
Brendan Howell 8 years ago
parent 1dac6a2cdb
commit c2505aa06c

@ -76,8 +76,10 @@ class MailRoom(Bureau):
"""
try:
self.imapserv.select_folder("INBOX")
except self.imapserv.abort as err:
except self.imapserv.AbortError as err:
print("imap connection error: ", err)
self.imapserv.logout()
self.imapserv = imapclient.IMAPClient(self.host, use_uid=True, ssl=self.imap_ssl)
self.imapserv.login(self.login, self.password)
self.imapserv.select_folder("INBOX")
@ -228,6 +230,8 @@ class MailRoom(Bureau):
msg["From"] = msg_obj["To"]
# TODO: deal with ReplyTo headers properly
msg["To"] = msg_obj["From"]
msg["Subject"] = "Re: " + msg_obj["Subject"]
#TODO: add reference headers from msg id for threading
msg["Date"] = email.utils.formatdate(localtime=True)
msg.attach(email.mime.text.MIMEText(bodytext))

@ -30,7 +30,8 @@ class Photography(Bureau):
#cmd1 = "fswebcam --jpeg 95 --no-banner --resolution 320x240 /dev/null"
#cmd2 = "fswebcam --jpeg 95 --no-banner --resolution 1920x1080 "
#cmd2 += "-F 2 -S 1" + tmpimg.name
cmd2 = "uvccapture -d/dev/video1 -x1920 -y1080 -o" + tmpimg.name
#cmd1 = "uvccapture -d/dev/video1 -x320 -y240 -o /dev/null"
cmd2 = "uvccapture -d/dev/video1 -D2 -m -x3264 -y2448 -o" + tmpimg.name
#subprocess.check_output(cmd1.split())
subprocess.check_output(cmd2.split())
return {"photo": tmpimg.name}

Loading…
Cancel
Save