commit c3fb6bc62050db1c021f6dbd1310a967aa45d2a7 Author: Arkadiusz MiĆkiewicz <ar...@maven.pl> Date: Thu Jun 20 09:14:23 2013 +0200
Use errno from exception reason since error.errno is mostly 0. PLD_Builder/rpm_builder.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) --- diff --git a/PLD_Builder/rpm_builder.py b/PLD_Builder/rpm_builder.py index 4a1ac2f..9c08c88 100644 --- a/PLD_Builder/rpm_builder.py +++ b/PLD_Builder/rpm_builder.py @@ -106,12 +106,7 @@ def fetch_src(r, b): b.log_line(msg) return False except urllib2.URLError, error: - # see errno.h - try: - errno = error.errno - except AttributeError: - # python 2.4 - errno = error.reason[0] + errno = error.reason.errno if errno in [-3, 60, 61, 110, 111]: b.log_line("unable to connect to %s... trying again" % (src_url)) ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/c3fb6bc62050db1c021f6dbd1310a967aa45d2a7 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit