summaryrefslogtreecommitdiff
path: root/summainlib.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-06-11 19:41:51 +0100
committerLars Wirzenius <liw@liw.fi>2011-06-11 19:41:51 +0100
commit1ab89da3a33a218ee07743a2e3a996cf0b34e71f (patch)
treea2dd9e5de7c6da6e426e7e961b893e9a53e1de62 /summainlib.py
parentcd8a42766810ddee9c754b386100f2603974e995 (diff)
downloadsummain-1ab89da3a33a218ee07743a2e3a996cf0b34e71f.tar.gz
Add md5 to Summain initializer.
Diffstat (limited to 'summainlib.py')
-rw-r--r--summainlib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/summainlib.py b/summainlib.py
index 6b3a6a8..141eacc 100644
--- a/summainlib.py
+++ b/summainlib.py
@@ -161,11 +161,12 @@ class FilesystemObject(object):
'''
def __init__(self, filename, nn, pn, exclude, stat_result=None, sha1=None,
- open_file=None, readlink=None):
+ md5=None, open_file=None, readlink=None):
self._filename = filename
self._exclude = set(self._normalize_key(k) for k in exclude)
self._pn = pn
self._nn = nn
+ self._md5 = md5 or hashlib.md5()
self._sha1 = sha1 or hashlib.sha1()
self._stat_result = stat_result or os.lstat(filename)
self.open_file = open_file or file