diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/combo-layer | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer index b4b1e4891e..648dda2349 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer | |||
| @@ -79,7 +79,7 @@ class Configuration(object): | |||
| 79 | logger.error("ERROR: patchutils package is missing, please install it (e.g. # apt-get install patchutils)") | 79 | logger.error("ERROR: patchutils package is missing, please install it (e.g. # apt-get install patchutils)") |
| 80 | sys.exit(1) | 80 | sys.exit(1) |
| 81 | 81 | ||
| 82 | def runcmd(cmd,destdir=None): | 82 | def runcmd(cmd,destdir=None,printerr=True): |
| 83 | """ | 83 | """ |
| 84 | execute command, raise CalledProcessError if fail | 84 | execute command, raise CalledProcessError if fail |
| 85 | return output if succeed | 85 | return output if succeed |
| @@ -90,7 +90,8 @@ def runcmd(cmd,destdir=None): | |||
| 90 | subprocess.check_call(cmd, stdout=out, stderr=out, cwd=destdir, shell=True) | 90 | subprocess.check_call(cmd, stdout=out, stderr=out, cwd=destdir, shell=True) |
| 91 | except subprocess.CalledProcessError,e: | 91 | except subprocess.CalledProcessError,e: |
| 92 | out.seek(0) | 92 | out.seek(0) |
| 93 | logger.error("%s" % out.read()) | 93 | if printerr: |
| 94 | logger.error("%s" % out.read()) | ||
| 94 | raise e | 95 | raise e |
| 95 | 96 | ||
| 96 | out.seek(0) | 97 | out.seek(0) |
| @@ -233,7 +234,7 @@ def action_update(conf, args): | |||
| 233 | # Step 7: commit the updated config file if it's being tracked | 234 | # Step 7: commit the updated config file if it's being tracked |
| 234 | relpath = os.path.relpath(conf.conffile) | 235 | relpath = os.path.relpath(conf.conffile) |
| 235 | try: | 236 | try: |
| 236 | output = runcmd("git status --porcelain %s" % relpath) | 237 | output = runcmd("git status --porcelain %s" % relpath, printerr=False) |
| 237 | except: | 238 | except: |
| 238 | # Outside the repository | 239 | # Outside the repository |
| 239 | output = None | 240 | output = None |
