1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-08-24 02:22:20 +00:00
This commit is contained in:
J. Fernando Sánchez
2015-12-11 14:53:30 +01:00
parent 82496dc8e4
commit 6fe68e3c40
3 changed files with 57 additions and 25 deletions

View File

@@ -112,6 +112,9 @@ class SenpyPlugin(Leaf):
def id(self):
return "{}_{}".format(self.name, self.version)
def __del__(self):
''' Destructor, to make sure all the resources are freed '''
self.deactivate()
class SentimentPlugin(SenpyPlugin):
@@ -139,8 +142,8 @@ class ShelfMixin(object):
@sh.deleter
def sh(self):
if hasattr(self, '_sh'):
del(self._sh)
if os.path.isfile(self.shelf_file):
os.remove(self.shelf_file)
@property
def shelf_file(self):