# HG changeset patch # User Marcin Kuzminski # Date 2013-01-24 00:20:03 # Node ID c0b0351233ec593c040638970acb13b6adb5eaf5 # Parent f5c5095c702896d1fa668976b334018eae13d989 safe_int should also catch TypeError diff --git a/rhodecode/lib/utils2.py b/rhodecode/lib/utils2.py --- a/rhodecode/lib/utils2.py +++ b/rhodecode/lib/utils2.py @@ -182,7 +182,7 @@ def safe_int(val, default=None): try: val = int(val) - except ValueError: + except (ValueError, TypeError): val = default return val