comparison detectors/emailauditor.py @ 5381:0942fe89e82e

Python 3 preparation: change "x.has_key(y)" to "y in x". (Also likewise "not in" where appropriate.) Tool-generated patch.
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 22:08:17 +0000
parents 6b32e9dac625
children
comparison
equal deleted inserted replaced
5380:64c4e43fbb84 5381:0942fe89e82e
27 4. Updated the URL that links to the file to reflect the new file 27 4. Updated the URL that links to the file to reflect the new file
28 name extension. 28 name extension.
29 29
30 So... we do that. :)''' 30 So... we do that. :)'''
31 if newvalues.get('type', '').lower() == "message/rfc822": 31 if newvalues.get('type', '').lower() == "message/rfc822":
32 if not newvalues.has_key('name'): 32 if 'name' not in newvalues:
33 newvalues['name'] = 'email.mht' 33 newvalues['name'] = 'email.mht'
34 return 34 return
35 name = newvalues['name'] 35 name = newvalues['name']
36 if name.endswith('.eml'): 36 if name.endswith('.eml'):
37 name = name[:-4] 37 name = name[:-4]

Roundup Issue Tracker: http://roundup-tracker.org/