aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-08-17 01:14:05 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-08-17 01:14:05 -0700
commitf41a699f5d0fcdf237b40c41376c460be438ea5c (patch)
tree8a1b7c3340fbdf9e8b9e52a9ed146558d010989c /share
parent7d029778e627217bf7d3ef33b5fccf43f8dd4dde (diff)
Fix to make the choose-a-port loop work correctly for webconfig.py under Python3
Diffstat (limited to 'share')
-rwxr-xr-xshare/tools/web_config/webconfig.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py
index cf004719..7ed6d519 100755
--- a/share/tools/web_config/webconfig.py
+++ b/share/tools/web_config/webconfig.py
@@ -364,8 +364,9 @@ while PORT <= 9000:
# Success
break;
except socket.error:
- type, value = sys.exc_info()[:2]
- if 'Address already in use' not in value:
+ err_type, err_value = sys.exc_info()[:2]
+ # str(err_value) handles Python3 correctly
+ if 'Address already in use' not in str(err_value):
break
PORT += 1