changeset 11:19a699305c29

better failure erroring
author drewp@bigasterisk.com
date Fri, 16 Jul 2021 00:32:43 -0700
parents 460a2cf8b22b
children 12e35f5fd9c5
files sync.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sync.py	Fri Jul 16 00:30:53 2021 -0700
+++ b/sync.py	Fri Jul 16 00:32:43 2021 -0700
@@ -71,7 +71,7 @@
                               capture_output=True,
                               cwd=self.projRoot,
                               env={'SSH_AUTH_SOCK': self.config['SSH_AUTH_SOCK']})
-        if not push.stdout.endswith(b'no changes found\n'):
+        if push.returncode != 0 and not push.stdout.endswith(b'no changes found\n'):
             raise ValueError(f'hg push failed with {push.stdout!r}')
 
 def getSshAuthSock():