This commit is contained in:
Kovid Goyal 2008-05-18 09:12:14 -07:00
parent 1e39c5ee21
commit faff1ecbdf

View File

@ -35,7 +35,10 @@ def sendmail(recipient='', subject='', attachments=[], body=''):
pt.write(open(attachments[0], 'rb').read())
pt.close()
subprocess.check_call('open -t '+pt.name, shell=True)
try:
subprocess.call('open -t '+pt.name, shell=True)
except: # For some reason making this call leads to a system call interrupted error
pass
else:
body = '"' + body.replace('"', '\\"') + '"'
subject = '"' + subject.replace('"', '\\"') + '"'