summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2015-10-29 15:11:09 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2015-10-29 15:49:06 -0400
commitac2ae2711602cbeaf5bbd50a20d1ad189b07474d (patch)
treeffa58910abfd5746f9f90a4e9fcb7890ff7e0598
parent4e32cd9a53ef77fd946f82063fee06f86beb107b (diff)
Small cleanup
Differential Revision: https://phabricator.freedesktop.org/D480
-rwxr-xr-xgit-phab12
1 files changed, 9 insertions, 3 deletions
diff --git a/git-phab b/git-phab
index b41c6fd..d7794fd 100755
--- a/git-phab
+++ b/git-phab
@@ -84,7 +84,7 @@ class GitPhab:
process = subprocess.Popen(editor + " " + filename, shell=True)
process.wait()
if process.returncode != 0:
- die("Editor exited with non-zero return code")
+ self.die("Editor exited with non-zero return code")
# Copied from git-bz
def edit_template(self, template):
@@ -264,7 +264,7 @@ class GitPhab:
# Validate that self.remote exists
try:
- remote = self.repo.remote(self.remote)
+ self.repo.remote(self.remote)
except:
self.die("%s not a valid remote. Aborting." % self.remote)
@@ -608,9 +608,15 @@ class GitPhab:
return (commit, branch)
def do_fetch(self):
- commit, branch = self.fetch()
+ if not self.task:
+ self.die("No task provided. Aborting.")
+
+ self.fetch()
def do_checkout(self):
+ if not self.task:
+ self.die("No task provided. Aborting.")
+
commit, remote_branch_name = self.fetch()
# Lookup for an existing branch for this task