Skip to content

Commit

Permalink
Merge pull request #40 from jamilatta/tk6
Browse files Browse the repository at this point in the history
Tk6 - refurbished
  • Loading branch information
jfunez authored Jun 23, 2017
2 parents 0bea84d + 31259c9 commit 04129c7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion legendarium/legendarium.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def _clean_suppl_number(self):
"""
Clean the suppl_number stripped the beginning and the end of the string.
"""
return self.suppl_number.strip()
if self.suppl_number:
return self.suppl_number.strip()
else:
return ''

def get_journal(self):
"""
Expand Down
5 changes: 4 additions & 1 deletion legendarium/urlegendarium.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def _clean_suppl_number(self):
"""
Clean the supplement number stripped the beginning and the end of the string.
"""
return self.suppl_number.strip()
if self.suppl_number:
return self.suppl_number.strip()
else:
return ''

def get_journal_seg(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_legendarium.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_build_legend_without_volume_and_number_and_year_pub_and_suppl_number(se

self.assertEqual(u'Rev.Mal-Estar Subj:e00120416', leg.stamp)

def test_build_legend_without_volume_and_number_and_year_pub_(self):
def test_build_legend_without_volume_and_number_and_year_pub(self):

del(self.dict_leg['volume']) # Remove the volume
del(self.dict_leg['number']) # Remove the number
Expand Down

0 comments on commit 04129c7

Please sign in to comment.