changeset 465:04205ba5dc98

handle HTTPErrors separately to work around them not having a "reason" attribute like URLError
author mgood
date Wed, 17 Oct 2007 23:10:10 +0000
parents 894b0b0721da
children 79be3c00ae69
files bitten/slave.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/slave.py
+++ b/bitten/slave.py
@@ -139,6 +139,10 @@
             try:
                 try:
                     self._create_build()
+                except urllib2.HTTPError, e:
+                    # HTTPError doesn't have the "reason" attribute of URLError
+                    log.error(e)
+                    raise ExitSlave()
                 except urllib2.URLError, e:
                     # Is this a temporary network glitch or something a bit
                     # more severe?
Copyright (C) 2012-2017 Edgewall Software