Commit 0277c547 authored by Guido Günther's avatar Guido Günther

PristineTar: Don't fail if pristine-tar does't support signatures

parent ad904b89
......@@ -92,7 +92,7 @@ class PristineTar(Command):
"""
args = ['checkout', archive]
self.run_error = 'Pristine-tar couldn\'t checkout "%s": {stderr_or_reason}' % os.path.basename(archive)
if signaturefile:
if signaturefile and self.has_feature_sig():
args += ['-s', signaturefile]
self.__call__(args, quiet=quiet)
......@@ -109,7 +109,7 @@ class PristineTar(Command):
args = ['commit', archive, upstream]
self.run_error = ("Couldn't commit to '%s' with upstream '%s': {stderr_or_reason}" %
(self.branch, upstream))
if signaturefile:
if signaturefile and self.has_feature_sig():
args += ['-s', signaturefile]
self.__call__(args, quiet=quiet)
......
......@@ -169,7 +169,7 @@ def test_pristine_tar_checkout_with_sig():
>>> os.unlink(sf)
>>> repo.pristine_tar.checkout('upstream', '1.0', 'gzip', '..',
... signature=True)
>>> os.path.exists(sf)
>>> os.path.exists(sf) or not repo.pristine_tar.has_feature_sig()
True
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment