From 8d1e343f7b4cdc0e9ef6f29e6345f769ef75c544 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 4 Jul 2012 22:15:47 +0200 Subject: [PATCH] TryInt returns 0 on fail --- couchpotato/core/helpers/variable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/helpers/variable.py b/couchpotato/core/helpers/variable.py index 0482fb40..1f1d3ba2 100644 --- a/couchpotato/core/helpers/variable.py +++ b/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)