commit 0784bf076c9b556294e841153bfa120aed87151c
Author: Kacper Kornet <[email protected]>
Date: Mon Sep 26 01:30:19 2011 +0100
Check for GitRepoError exception in ThreadFetch
Otherwise slug.py hangs up if an error during git fetch is encountered.
slug.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/slug.py b/slug.py
index 351a970..8e8303f 100755
--- a/slug.py
+++ b/slug.py
@@ -39,8 +39,11 @@ class ThreadFetch(threading.Thread):
def run(self):
while True:
(gitrepo, ref2fetch) = self.queue.get()
- (stdout, stderr) = gitrepo.fetch(ref2fetch, self.depth)
- print('------', gitrepo.gdir[:-len('.git')], '------\n' +
stderr.decode('utf-8'))
+ try:
+ (stdout, stderr) = gitrepo.fetch(ref2fetch, self.depth)
+ print('------', gitrepo.gdir[:-len('.git')], '------\n' +
stderr.decode('utf-8'))
+ except GitRepoError as e:
+ print('------', gitrepo.gdir[:-len('.git')], '------\n', e)
self.queue.task_done()
def readconfig(path):
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit