Remove unused variables

This commit is contained in:
Ruud
2012-05-06 23:19:27 +02:00
parent c21f283454
commit a9a1b07c84
3 changed files with 17 additions and 2 deletions

View File

@@ -51,7 +51,10 @@ class LibraryPlugin(Plugin):
handle = fireEventAsync if update_after is 'async' else fireEvent
handle('library.update', identifier = l.identifier, default_title = toUnicode(attrs.get('title', '')))
return l.to_dict(self.default_dict)
library_dict = l.to_dict(self.default_dict)
db.remove()
return library_dict
def update(self, identifier, default_title = '', force = False):
@@ -127,6 +130,7 @@ class LibraryPlugin(Plugin):
fireEvent('library.update_finish', data = library_dict)
db.remove()
return library_dict
def updateReleaseDate(self, identifier):

View File

@@ -85,6 +85,8 @@ class Release(Plugin):
db.remove()
return True
def saveFile(self, filepath, type = 'unknown', include_media_info = False):
@@ -107,6 +109,7 @@ class Release(Plugin):
rel.delete()
db.commit()
db.remove()
return jsonified({
'success': True
})
@@ -123,6 +126,7 @@ class Release(Plugin):
rel.status_id = available_status.get('id') if rel.status_id is ignored_status.get('id') else ignored_status.get('id')
db.commit()
db.remove()
return jsonified({
'success': True
})
@@ -149,12 +153,14 @@ class Release(Plugin):
'files': {}
}), manual = True)
db.remove()
return jsonified({
'success': True
})
else:
log.error('Couldn\'t find release with id: %s' % id)
db.remove()
return jsonified({
'success': False
})

View File

@@ -164,7 +164,12 @@ class Event(object):
if not self.asynchronous:
self.queue.join()
return self.result or None
res = self.result or None
# Cleanup
self.result = {}
return res
def count(self):
""" Returns the count of registered handlers """