diff options
author | Barry Warsaw <barry@list.org> | 2008-11-12 23:02:29 -0500 |
---|---|---|
committer | Barry Warsaw <barry@list.org> | 2008-11-12 23:02:29 -0500 |
commit | a86be44b08fe0935fe77d90948b9baad85af3624 (patch) | |
tree | cc9b8b20530f1d54975005d19f9a17fddade945d /bin/update | |
parent | 392554b8de4641c8ac9c5ca1e062919a64ecd020 (diff) | |
download | mailman2-a86be44b08fe0935fe77d90948b9baad85af3624.tar.gz mailman2-a86be44b08fe0935fe77d90948b9baad85af3624.tar.xz mailman2-a86be44b08fe0935fe77d90948b9baad85af3624.zip |
Apply Heiko Rommel's patch for hashlib deprecation warnings for bug 293178.
I've modified the patch to improve some of the stylistic issues.
Diffstat (limited to '')
-rwxr-xr-x | bin/update | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -34,7 +34,6 @@ some previous version. It knows about versions back to 1.0b4 (?). """ import os -import md5 import sys import time import errno @@ -131,7 +130,7 @@ def move_language_templates(mlist): # No global template continue - gcksum = md5.new(fp.read()).digest() + gcksum = Utils.md5_new(fp.read()).digest() fp.close() # Match against the lists/<list>/* template try: @@ -139,7 +138,7 @@ def move_language_templates(mlist): except IOError, e: if e.errno <> errno.ENOENT: raise else: - tcksum = md5.new(fp.read()).digest() + tcksum = Utils.md5_new(fp.read()).digest() fp.close() if gcksum == tcksum: os.unlink(os.path.join(mlist.fullpath(), gtemplate)) @@ -149,7 +148,7 @@ def move_language_templates(mlist): except IOError, e: if e.errno <> errno.ENOENT: raise else: - tcksum = md5.new(fp.read()).digest() + tcksum = Utils.md5_new(fp.read()).digest() fp.close() if gcksum == tcksum: os.unlink(os.path.join(mlist.fullpath(), gtemplate + '.prev')) @@ -159,7 +158,7 @@ def move_language_templates(mlist): except IOError, e: if e.errno <> errno.ENOENT: raise else: - tcksum = md5.new(fp.read()).digest() + tcksum = Utils.md5_new(fp.read()).digest() fp.close() if gcksum == tcksum: os.unlink(os.path.join(mlist.fullpath(), 'en', gtemplate)) @@ -169,7 +168,7 @@ def move_language_templates(mlist): except IOError, e: if e.errno <> errno.ENOENT: raise else: - tcksum = md5.new(fp.read()).digest() + tcksum = Utils.md5_new(fp.read()).digest() fp.close() if gcksum == tcksum: os.unlink(os.path.join(mm_cfg.TEMPLATE_DIR, gtemplate)) @@ -179,7 +178,7 @@ def move_language_templates(mlist): except IOError, e: if e.errno <> errno.ENOENT: raise else: - tcksum = md5.new(fp.read()).digest() + tcksum = Utils.md5_new(fp.read()).digest() fp.close() if gcksum == tcksum: os.unlink(os.path.join(mm_cfg.TEMPLATE_DIR, |