SPM: packaging doesn't work in Python 2.6. Fixed.

This commit is contained in:
Gleb Goncharov 2015-11-03 14:18:38 +03:00 committed by rallytime
parent 98fa4a404e
commit e50a6783ce

View file

@ -622,12 +622,11 @@ class SPMClient(object):
formula_tar = tarfile.open(out_path, 'w:bz2')
# Add FORMULA first, to speed up create_repo on large packages
formula_tar.add(formula_path, formula_conf['name'], filter=self._exclude)
try:
formula_tar.add(formula_path, formula_conf['name'], filter=self._exclude)
formula_tar.add(self.abspath, formula_conf['name'], filter=self._exclude)
except TypeError:
formula_tar.add(formula_path, formula_conf['name'], exclude=self._exclude)
formula_tar.add(self.abspath, formula_conf['name'], exclude=self._exclude)
formula_tar.close()