Make Python code more idiomatic
This commit is contained in:
@@ -238,7 +238,7 @@ class ReadTrackTask(task.Task):
|
||||
@param what: a string representing what's being read; e.g. Track
|
||||
@type what: str
|
||||
"""
|
||||
assert type(path) is unicode, "%r is not unicode" % path
|
||||
assert isinstance(path, unicode), "%r is not unicode" % path
|
||||
|
||||
self.path = path
|
||||
self._table = table
|
||||
|
||||
@@ -23,7 +23,7 @@ class AudioLengthTask(ctask.PopenTask):
|
||||
"""
|
||||
@type path: unicode
|
||||
"""
|
||||
assert type(path) is unicode, "%r is not unicode" % path
|
||||
assert isinstance(path, unicode), "%r is not unicode" % path
|
||||
|
||||
self.logName = os.path.basename(path).encode('utf-8')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user