diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-09-12 15:48:20 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-11-14 14:47:21 +0200 |
commit | f7faf56ac38dc0e702c82ae44e6c1c34ef00dfde (patch) | |
tree | e19f9b217c54c0bb8d50a5fbcce31aea3716ec68 | |
parent | a803d61fc03e875d4a804936c6649f58a26e0c6e (diff) | |
download | git-buildpackage-f7faf56ac38dc0e702c82ae44e6c1c34ef00dfde.tar.gz git-buildpackage-f7faf56ac38dc0e702c82ae44e6c1c34ef00dfde.tar.bz2 git-buildpackage-f7faf56ac38dc0e702c82ae44e6c1c34ef00dfde.zip |
GitRepository/__git_inout: correctly handle input error
Change-Id: I3c9b8851490c05719f77a9519418a98f572d68e3
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r-- | gbp/git/repository.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 6b21c252..9843d99b 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -252,7 +252,12 @@ class GitRepository(object): ready = select.select(out_fds, in_fds, []) # Write in chunks of 512 bytes if ready[1]: - popen.stdin.write(stdin[w_ind:w_ind+512]) + try: + popen.stdin.write(stdin[w_ind:w_ind+512]) + except IOError: + # Ignore, we want to read buffers to e.g. get error message + # Git should give an error code so that we catch an error + pass w_ind += 512 if w_ind > len(stdin): rm_polled_fd(popen.stdin, in_fds) |