TryInt returns 0 on fail

This commit is contained in:
Ruud
2012-07-04 22:15:47 +02:00
parent 76b89c192e
commit 8d1e343f7b
+1 -1
View File
@@ -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)