fixed a pep-issue in songs-lib and corrected a comment in a test

This commit is contained in:
Stefan Strasser 2014-04-26 07:07:08 +02:00
parent 1cd7d73d10
commit c2d1589dcb
2 changed files with 3 additions and 3 deletions

View File

@ -213,7 +213,7 @@ class VerseType(object):
for num, tag in enumerate(VerseType.tags):
if verse_tag == tag:
return num
if default in range(0,len(VerseType.names)) or default is None:
if default in range(0, len(VerseType.names)) or default is None:
return default
else:
return VerseType.Other
@ -231,7 +231,7 @@ class VerseType(object):
for num, tag in enumerate(VerseType.translated_tags):
if verse_tag == tag:
return num
if default in range(0,len(VerseType.names)) or default is None:
if default in range(0, len(VerseType.names)) or default is None:
return default
else:
return VerseType.Other

View File

@ -484,5 +484,5 @@ class TestVerseType(TestCase):
# WHEN: We run the from_tag() method with an invalid verse type, we get the specified default back
result = VerseType.from_tag('m', None)
# THEN: The result should be VerseType.Other
# THEN: The result should be None
self.assertIsNone(result, 'The result should be None, but was "%s"' % result)