fix module and input string names clash

This commit is contained in:
Serghei Mihai 2016-05-04 01:00:28 +02:00
parent 544019cdb0
commit 61bed4a4bc
1 changed files with 3 additions and 3 deletions

View File

@ -104,14 +104,14 @@ L'équipe Entr'ouvert"""
if __name__ == '__main__':
email = sys.stdin.read()
mail = sys.stdin.read()
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(email)
mail_dump.write(mail)
try:
create_ticket(email)
create_ticket(mail)
except:
exim = subprocess.Popen(['/usr/sbin/exim', FALLBACK_EMAIL], stdin=file(filename))