From ba7f43cd8011856ce4b055d3f20923e66c640eab Mon Sep 17 00:00:00 2001 From: "biao716.wang" Date: Fri, 2 Dec 2022 17:49:18 +0900 Subject: [PATCH] fix run error for gbp Change-Id: If8a7cfbd61cea46af63612c76b2934774468130a Signed-off-by: biao716.wang --- gbp/git/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 64053a55..d52d5c96 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -993,7 +993,7 @@ class GitRepository(object): capture_stderr=True) if ret: raise GitRepositoryError("revision '%s' not found" % name) - return self.strip_sha1(sha[0].decode(), short) + return self.strip_sha1(sha.decode().splitlines()[0], short) @staticmethod def strip_sha1(sha1, length=0): -- 2.34.1