Skip to content

Commit e3649e6

Browse files
committed
Bugfix
1 parent bb8e571 commit e3649e6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

common/http.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ def get(url):
6060
addr = socket.getaddrinfo(host, port)[0][-1]
6161
s = socket.socket()
6262
try: s.settimeout(60)
63-
except: pass s.connect(addr)
63+
except: pass
64+
s.connect(addr)
6465
s.send(bytes('GET /%s HTTP/1.0\r\nHost: %s\r\n\r\n' % (path, host), 'utf8'))
6566

6667
# Status, msg etc.
@@ -92,7 +93,8 @@ def download(source,dest):
9293
addr = socket.getaddrinfo(host, port)[0][-1]
9394
s = socket.socket()
9495
try: s.settimeout(60)
95-
except: pass s.connect(addr)
96+
except: pass
97+
s.connect(addr)
9698
s.send(bytes('GET /%s HTTP/1.0\r\nHost: %s\r\n\r\n' % (path, host), 'utf8'))
9799

98100
# Status, msg etc.

0 commit comments

Comments
 (0)