Commit e5ca9dd3 authored by Lucas Carvalho's avatar Lucas Carvalho

The user must only be able to close the connection if it is defined

parent 56e45f59
...@@ -131,8 +131,11 @@ class NetworkcacheClient(object): ...@@ -131,8 +131,11 @@ class NetworkcacheClient(object):
def close(self): def close(self):
''' It must be called to close the HTTP Connection. ''' ''' It must be called to close the HTTP Connection. '''
self.shacache_connection.close() if hasattr(self, 'shacache_connection'):
self.shadir_connection.close() self.shacache_connection.close()
if hasattr(self, 'shadir_connection'):
self.shadir_connection.close()
class FileNotFound(Exception): class FileNotFound(Exception):
pass pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment