Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'python2.4-support'

  • Loading branch information...
commit 7bce776fdf88195c55bce492b551e4a252f879c4 2 parents 4c4d027 + 9a6d6e3
@edsu authored
Showing with 24 additions and 4 deletions.
  1. +5 −0 .travis.yml
  2. +6 −4 bagit.py
  3. +13 −0 setup.py
View
5 .travis.yml
@@ -1,2 +1,7 @@
language: python
+python:
+ - "2.7"
+ - "2.6"
+ - "2.5"
+ - "2.4"
script: python setup.py test
View
10 bagit.py
@@ -122,11 +122,11 @@ def make_bag(bag_dir, bag_info=None, processes=1):
bag_info_txt.close()
except Exception, e:
- logging.error(e)
-
- finally:
os.chdir(old_dir)
+ logging.error(e)
+ raise e
+ os.chdir(old_dir)
return Bag(bag_dir)
@@ -243,9 +243,11 @@ def fetch_entries(self):
for line in fetch_file:
parts = line.strip().split(None, 2)
yield (parts[0], parts[1], parts[2])
- finally:
+ except Exception, e:
fetch_file.close()
+ raise e
+ fetch_file.close()
def files_to_be_fetched(self):
for f, size, path in self.fetch_entries():
yield f
View
13 setup.py
@@ -7,6 +7,18 @@
See: http://en.wikipedia.org/wiki/BagIt for more details.
"""
+# for older pythons ...
+requirements = []
+try:
+ import multiprocessing
+except:
+ requirements.append("multiprocessing")
+try:
+ import hashlib
+except:
+ requirements.append("hashlib")
+
+
setup(
name = 'bagit',
version = '0.9.8',
@@ -18,6 +30,7 @@
description = description,
platforms = ['POSIX'],
test_suite = 'test',
+ install_requires = requirements,
classifiers = [
'License :: Public Domain',
'Intended Audience :: Developers',
Please sign in to comment.
Something went wrong with that request. Please try again.