diff options
author | Lars Wirzenius <liw@liw.fi> | 2010-04-15 20:08:35 +1200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2010-04-15 20:08:35 +1200 |
commit | 56d5da7ebafe3fd39e1a0a36f327e71e3acc72bd (patch) | |
tree | 96c55fd2f7abbad3b96645f52c2f1f25a58fb974 | |
parent | 9b8e53c4e1106d987ec4bd18d493b028c4e703ed (diff) | |
download | eoc-56d5da7ebafe3fd39e1a0a36f327e71e3acc72bd.tar.gz |
Applied patch from Tomi Tuominen to fix deprecation warning.
Python's md5 module is deprecated. The hashlib module replaces it.
-rw-r--r-- | eoc.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -8,7 +8,7 @@ VERSION = "1.2.6" PLUGIN_INTERFACE_VERSION = "1" import getopt -import md5 +import hashlib import os import shutil import smtplib @@ -78,8 +78,7 @@ COMMANDS = SIMPLE_COMMANDS + SUB_COMMANDS + HASH_COMMANDS def md5sum_as_hex(s): - return md5.new(s).hexdigest() - + return hashlib.md5(s).hexdigest() def forkexec(argv, text): """Run a command (given as argv array) and write text to its stdin""" |