Changeset 135:1ba73354f9c7
- Timestamp:
- 04/17/09 09:08:14 (16 months ago)
- Author:
- Ga?tan de Menten <ged@…>
- Branch:
- default
- Message:
-
supress Deprecated Warning in python2.6+
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r125
|
r135
|
|
| 22 | 22 | |
| 23 | 23 | import re |
| 24 | | import md5 |
| | 24 | try: |
| | 25 | # requires python 2.5+ |
| | 26 | from hashlib import md5 |
| | 27 | except ImportError: |
| | 28 | from md5 import md5 |
| | 29 | |
| 25 | 30 | import time |
| 26 | 31 | import urllib |
| … |
… |
|
| 115 | 120 | bitstream.seek(0) |
| 116 | 121 | file_content = bitstream.read() |
| 117 | | name = md5.new(file_content).hexdigest() |
| | 122 | name = md5(file_content).hexdigest() |
| 118 | 123 | path = 'Pictures/%s.%s' % (name, EXTENSIONS[mimetype]) |
| 119 | 124 | if path not in self.zip.namelist(): |