summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGökçen Nurlu <gnurlu1@bloomberg.net>2017-12-12 15:40:47 +0000
committerJürg Billeter <j@bitron.ch>2017-12-12 20:41:06 +0100
commit82e7dd028d71a525c56f6d81903649946cda1e66 (patch)
treef32434fdd45015a1aace9f2d6e8efda19dc5883f
parented9b827de06f012f6c7f576034fcbc3eb3e6231f (diff)
downloadbuildstream-82e7dd028d71a525c56f6d81903649946cda1e66.tar.gz
plugins/sources/git.py: Fix potential NameError
The residual `from e` was probably left there after a refactoring from try-catch to exit-code-checking. While this could prevent the expected `SourceError` being thrown, I couldn't find a proper way to trigger it since `git show` has no documented return codes other than `0` and `128`.
-rw-r--r--buildstream/plugins/sources/git.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/plugins/sources/git.py b/buildstream/plugins/sources/git.py
index 093f37dba..0875c34f0 100644
--- a/buildstream/plugins/sources/git.py
+++ b/buildstream/plugins/sources/git.py
@@ -176,7 +176,7 @@ class GitMirror():
elif exit_code != 0:
raise SourceError(
"{plugin}: Failed to show gitmodules at ref {ref}".format(
- plugin=self, ref=self.ref)) from e
+ plugin=self, ref=self.ref))
content = '\n'.join([l.strip() for l in output.splitlines()])