"""
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)
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)
>>> 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
"""