diff options
author | Zoltan Kiss <zoltan.kiss@linaro.org> | 2016-08-05 12:37:23 +0100 |
---|---|---|
committer | Zoltan Kiss <zoltan.kiss@linaro.org> | 2016-08-05 12:37:23 +0100 |
commit | 593db241c782ef5e597eed63dd9236fa1bb964a8 (patch) | |
tree | 8c7e1e1b0e679c116a26020b99ee847c1e2a354c | |
parent | e83dcad9fc2c45ded1389278d8ce77357bf6a3fb (diff) |
linux-dpdk: git-transplant.py: handle exception when there is no match with grep
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
-rwxr-xr-x | scripts/git-transplant.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/git-transplant.py b/scripts/git-transplant.py index 9581995a5..aeb29be39 100755 --- a/scripts/git-transplant.py +++ b/scripts/git-transplant.py @@ -77,7 +77,11 @@ for dirname, dirnames, filenames in os.walk(overlay_dir): # Print which files the commits change, and grep the new files added wholefilechanges = "git log --oneline --ancestry-path --name-status " + \ interval + " " + orig_dir + " |grep \"^A\"" -output = subprocess.check_output([wholefilechanges], shell=True) +try: + output = subprocess.check_output([wholefilechanges], shell=True) +except subprocess.CalledProcessError: + output = "" + pass for row in output.split('\n') : # Ignore empty lines if not row : |