check the mails dump directory exists
This commit is contained in:
parent
adde1b024a
commit
a45871b95a
|
@ -120,7 +120,10 @@ L'équipe Entrouvert
|
|||
if __name__ == '__main__':
|
||||
|
||||
mail = sys.stdin.read()
|
||||
filename = '/tmp/%s.mail' % uuid.uuid4()
|
||||
mail_dumps_dir = '/var/tmp'
|
||||
if not os.path.exists(mail_dumps_dir):
|
||||
os.mkdir(mail_dumps_dir)
|
||||
filename = os.path.join(mail_dumps_dir, '%s.mail' % uuid.uuid4())
|
||||
with open(filename, 'w') as mail_dump:
|
||||
mail_dump.write(mail)
|
||||
create_ticket(mail)
|
||||
|
|
Loading…
Reference in New Issue