mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #690
This commit is contained in:
parent
1e39c5ee21
commit
faff1ecbdf
@ -35,7 +35,10 @@ def sendmail(recipient='', subject='', attachments=[], body=''):
|
|||||||
pt.write(open(attachments[0], 'rb').read())
|
pt.write(open(attachments[0], 'rb').read())
|
||||||
pt.close()
|
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:
|
else:
|
||||||
body = '"' + body.replace('"', '\\"') + '"'
|
body = '"' + body.replace('"', '\\"') + '"'
|
||||||
subject = '"' + subject.replace('"', '\\"') + '"'
|
subject = '"' + subject.replace('"', '\\"') + '"'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user