From: Guido Günther Date: Tue, 30 Jun 2020 07:46:15 +0000 (+0200) Subject: upstreamsource: Add __repr__ X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=700c6735bfd206ae9173f0e2688fed5a81f10dfd;p=tools%2Fgit-buildpackage.git upstreamsource: Add __repr__ This eases debugging --- diff --git a/gbp/pkg/upstreamsource.py b/gbp/pkg/upstreamsource.py index a312c3bb..384513e5 100644 --- a/gbp/pkg/upstreamsource.py +++ b/gbp/pkg/upstreamsource.py @@ -50,6 +50,12 @@ class UpstreamSource(object): if self.is_dir(): self.unpacked = self.path + def __repr__(self): + path = "'%s'" % self.path if self.path is not None else None + sig = "'%s'" % self.signaturefile if self.signaturefile is not None else None + return "<%s path=%s signaturefile=%s>" % (self.__class__.__name__, + path, sig) + def _check_orig(self): """ Check if upstream source format can be used as orig tarball.