Changeset - c0b0351233ec
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-01-24 01:20:03
marcin@python-works.com
safe_int should also catch TypeError
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/utils2.py
Show inline comments
 
@@ -182,7 +182,7 @@ def safe_int(val, default=None):
 

	
 
    try:
 
        val = int(val)
 
    except ValueError:
 
    except (ValueError, TypeError):
 
        val = default
 

	
 
    return val
0 comments (0 inline, 0 general)