mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Fix to make the choose-a-port loop work correctly for webconfig.py under Python3
This commit is contained in:
parent
7d029778e6
commit
f41a699f5d
@ -364,8 +364,9 @@ while PORT <= 9000:
|
|||||||
# Success
|
# Success
|
||||||
break;
|
break;
|
||||||
except socket.error:
|
except socket.error:
|
||||||
type, value = sys.exc_info()[:2]
|
err_type, err_value = sys.exc_info()[:2]
|
||||||
if 'Address already in use' not in value:
|
# str(err_value) handles Python3 correctly
|
||||||
|
if 'Address already in use' not in str(err_value):
|
||||||
break
|
break
|
||||||
PORT += 1
|
PORT += 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user