aboutsummaryrefslogtreecommitdiff
path: root/wrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'wrap.py')
-rw-r--r--wrap.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/wrap.py b/wrap.py
index 9c88403..3b3b640 100644
--- a/wrap.py
+++ b/wrap.py
@@ -69,9 +69,10 @@ class Resolver:
if revno.lower() == 'head':
subprocess.check_call(['git', 'pull'], cwd=checkoutdir)
else:
- subprocess.check_call(['git', 'fetch'], cwd=checkoutdir)
- subprocess.check_call(['git', 'checkout', revno],
- cwd=checkoutdir)
+ if subprocess.call(['git', 'checkout', revno], cwd=checkoutdir) != 0:
+ subprocess.check_call(['git', 'fetch'], cwd=checkoutdir)
+ subprocess.check_call(['git', 'checkout', revno],
+ cwd=checkoutdir)
else:
subprocess.check_call(['git', 'clone', p.get('url'), p.get('directory')],
cwd=self.subdir_root)