Close sockets without catching exceptions
This commit is contained in:
parent
4ea0cbe677
commit
858046cb2f
@ -67,15 +67,9 @@ def main():
|
|||||||
print('Unexpected error:', e, file=sys.stderr)
|
print('Unexpected error:', e, file=sys.stderr)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
try:
|
|
||||||
rs.close()
|
rs.close()
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
gs.close()
|
gs.close()
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main() or 0)
|
sys.exit(main() or 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user