Fixed ResourceWarning in python 3.2+
This commit is contained in:
@@ -130,6 +130,9 @@ def main():
|
||||
print('Error: could not open file with program "{}", '
|
||||
'try setting RTV_EDITOR'.format(e.name))
|
||||
except KeyboardInterrupt:
|
||||
return
|
||||
pass
|
||||
finally:
|
||||
# Ensure sockets are closed to prevent a ResourceWarning
|
||||
reddit.handler.http.close()
|
||||
|
||||
sys.exit(main())
|
||||
|
||||
Reference in New Issue
Block a user