commit f11618d58b64bc08c07999a4dfc49e5281fa6c99
parent 1a2154ebf3fe7cc73b1436c7a981791eda2cdb02
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Sat, 1 Feb 2014 13:23:10 +0100
avoid crash for unknown phon
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/verse.py b/verse.py
@@ -305,7 +305,7 @@ class Verse:
# actually, this will have an influence on the rhyme's gender
# see feminine
possible = []
- if len(self.phon) == 0:
+ if not self.phon or len(self.phon) == 0:
return [0, 1] # do something reasonable without pron
for possible_phon in self.phon:
if possible_phon.endswith(')') or possible_phon.endswith('#'):