fix run error for gbp 94/284994/1
authorbiao716.wang <biao716.wang@samsung.com>
Fri, 2 Dec 2022 08:49:18 +0000 (17:49 +0900)
committerbiao716.wang <biao716.wang@samsung.com>
Fri, 2 Dec 2022 08:49:18 +0000 (17:49 +0900)
Change-Id: If8a7cfbd61cea46af63612c76b2934774468130a
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
gbp/git/repository.py

index 64053a5..d52d5c9 100644 (file)
@@ -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):