Skip to content

Commit

Permalink
make sanity checks in str_to_bool()
Browse files Browse the repository at this point in the history
  • Loading branch information
ilstam committed Sep 25, 2013
1 parent 84c10b9 commit a2280a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ffmulticonverter/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

def str_to_bool(string):
"""Convert a string to bool and return it."""
return string.lower() == 'true'
if string is not None:
return string.lower() == 'true'
return False

def is_installed(program):
"""Return True if program appears in user's PATH var, else False."""
Expand Down

0 comments on commit a2280a4

Please sign in to comment.