summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@hotmail.com>2013-09-22 21:08:18 -0400
committerAnthony G. Basile <blueness@gentoo.org>2013-09-24 14:20:10 -0400
commite279816d1bf27cfd83796c1d46d4a0cd08f76e67 (patch)
treea5960e81be26dee324a18186efb0cbe1a17e71f6
parentWebappConfig/compat.py: Adds compatibility check for file_md5(). (diff)
downloadwebapp-config-e279816d1bf27cfd83796c1d46d4a0cd08f76e67.tar.gz
webapp-config-e279816d1bf27cfd83796c1d46d4a0cd08f76e67.tar.bz2
webapp-config-e279816d1bf27cfd83796c1d46d4a0cd08f76e67.zip
WebappConfig/content.py: Adds use of create_md5() function.
This update adds the use of compat.py into content.py and makes use of the create_md5() function. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--WebappConfig/content.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/WebappConfig/content.py b/WebappConfig/content.py
index 966a9cd..7eff223 100644
--- a/WebappConfig/content.py
+++ b/WebappConfig/content.py
@@ -26,7 +26,7 @@ import hashlib, re, os, os.path
from WebappConfig.debug import OUT
from WebappConfig.permissions import PermissionMap
-
+from WebappConfig.compat import create_md5
# ========================================================================
# Content handler
# ------------------------------------------------------------------------
@@ -531,7 +531,7 @@ class Contents:
def file_md5(self, filename):
''' Return the md5 hash for the file content.'''
- return str(hashlib.md5(open(filename).read()).hexdigest())
+ create_md5(filename)
def file_time(self, filename):
''' Return the last modification time.'''