about summary refs log tree commit diff
path: root/kcc/image.py
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@vulturis.eu>2014-01-25 10:42:38 +0100
committerPaweł Jastrzębski <pawelj@vulturis.eu>2014-01-25 10:42:38 +0100
commit3a536df626798d4895039c6596fd03bedcfd6b66 (patch)
tree1106a9ed31b47cff07ffa0e2777770eaae25dfe8 /kcc/image.py
parentAdded MD5 check to update mechanism (diff)
downloadkcc-3a536df626798d4895039c6596fd03bedcfd6b66.tar.gz
kcc-3a536df626798d4895039c6596fd03bedcfd6b66.tar.bz2
kcc-3a536df626798d4895039c6596fd03bedcfd6b66.zip
Code cleanup
Diffstat (limited to 'kcc/image.py')
-rwxr-xr-xkcc/image.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/kcc/image.py b/kcc/image.py
index b3016cd..5821e48 100755
--- a/kcc/image.py
+++ b/kcc/image.py
@@ -1,7 +1,7 @@
 # Copyright (C) 2010  Alex Yatskov
 # Copyright (C) 2011  Stanislav (proDOOMman) Kosolapov <prodoomman@gmail.com>
-# Copyright (C) 2012-2013  Ciro Mattia Gonano <ciromattia@gmail.com>
-# Copyright (C) 2013 Pawel Jastrzebski <pawelj@vulturis.eu>
+# Copyright (c) 2012-2014 Ciro Mattia Gonano <ciromattia@gmail.com>
+# Copyright (c) 2013-2014 Pawel Jastrzebski <pawelj@vulturis.eu>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,24 +17,13 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 __license__ = 'ISC'
-__copyright__ = '2012-2013, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@vulturis.eu>'
+__copyright__ = '2012-2014, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@vulturis.eu>'
 __docformat__ = 'restructuredtext en'
 
 import os
-from hashlib import md5
 from functools import reduce
 from PIL import Image, ImageOps, ImageStat, ImageChops
-
-
-def md5Checksum(filePath):
-    with open(filePath, 'rb') as fh:
-        m = md5()
-        while True:
-            data = fh.read(8192)
-            if not data:
-                break
-            m.update(data)
-        return m.hexdigest()
+from .shared import md5Checksum
 
 
 class ProfileData: