Browse Source

TryInt returns 0 on fail

pull/584/head
Ruud 13 years ago
parent
commit
8d1e343f7b
  1. 2
      couchpotato/core/helpers/variable.py

2
couchpotato/core/helpers/variable.py

@ -101,7 +101,7 @@ def getImdb(txt, check_inside = True):
def tryInt(s):
try: return int(s)
except: return s
except: return 0
def tryFloat(s):
try: return float(s) if '.' in s else tryInt(s)

Loading…
Cancel
Save