2680aa5254a2 — Joe Ulfers 4 years ago
Trap error when nothing to push
1 files changed, 6 insertions(+), 1 deletions(-)

M release.py
M release.py +6 -1
@@ 13,7 13,12 @@ manifest_path = addon_root/'manifest.jso
 if check_output(['hg', 'stat']):
     print('Fail: local changes', file=stderr)
     exit(1)
-check_output(['hg', 'push'])
+try:
+    check_output(['hg', 'push'])
+except CalledProcessError as e:
+    # exit code 1 = nothing to push
+    if e.returncode != 1:
+        raise
 
 with manifest_path.open(encoding='utf-8') as m:
     manifest = json.load(m)