From 037040f73e0940957dff77e74b40d5c85734e712 Mon Sep 17 00:00:00 2001 From: Aymen Bouaziz Date: Tue, 28 Jun 2016 12:27:23 +0200 Subject: [PATCH] Fix variable assignment If upstream string is empty, current_branch_only variable will be assigned to an empty string. This is not what we expect here as this variable is a boolean. Change-Id: Ibba935e25a74c2be1e50c88b4b403cf394ba365e --- project.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project.py b/project.py index d54e336c..6dfb31c3 100644 --- a/project.py +++ b/project.py @@ -1838,7 +1838,10 @@ class Project(object): # will fail. # * otherwise, fetch all branches to make sure we end up with the # specific commit. - current_branch_only = self.upstream and not ID_RE.match(self.upstream) + if self.upstream: + current_branch_only = not ID_RE.match(self.upstream) + else: + current_branch_only = False if not name: name = self.remote.name