Commit 01763d11 authored by Thibault Saunier's avatar Thibault Saunier

previewers: Fix pep8 issues

parent 981ae5fd
......@@ -144,8 +144,8 @@ class ThumbnailBin(PreviewerBin):
def do_get_property(self, prop):
if prop.name == 'uri':
return self.uri
else:
raise AttributeError('unknown property %s' % prop.name)
raise AttributeError('unknown property %s' % prop.name)
def do_set_property(self, prop, value):
if prop.name == 'uri':
......@@ -205,10 +205,11 @@ class WaveformPreviewer(PreviewerBin):
def do_get_property(self, prop):
if prop.name == 'uri':
return self.uri
elif prop.name == 'duration':
if prop.name == 'duration':
return self.duration
else:
raise AttributeError('unknown property %s' % prop.name)
raise AttributeError('unknown property %s' % prop.name)
def do_set_property(self, prop, value):
if prop.name == 'uri':
......@@ -794,7 +795,7 @@ class ThumbnailCache(Loggable):
def __existing_positions(self):
self._cur.execute("SELECT Time FROM Thumbs")
return set([row[0] for row in self._cur.fetchall()])
return {row[0] for row in self._cur.fetchall()}
@classmethod
def get(cls, obj):
......
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