xmlclass/xmlclass.py
changeset 1780 c52d1460cea8
parent 1777 c46ec818bdd7
child 1782 5b6ad7a7fd9d
--- a/xmlclass/xmlclass.py	Sat Aug 19 17:17:54 2017 +0300
+++ b/xmlclass/xmlclass.py	Sat Aug 19 18:12:20 2017 +0300
@@ -191,7 +191,7 @@
         raise ValueError("\"%s\" isn't a valid hexadecimal integer!" % value)
     try:
         return int(value, 16)
-    except:
+    except Exception:
         raise ValueError("\"%s\" isn't a valid hexadecimal integer!" % value)
 
 
@@ -221,7 +221,7 @@
         try:
             # TODO: permit to write value like 1E2
             value = int(value)
-        except:
+        except Exception:
             raise ValueError("\"%s\" isn't a valid integer!" % value)
         if minInclusive is not None and value < minInclusive:
             raise ValueError("\"%d\" isn't greater or equal to %d!" %
@@ -260,7 +260,7 @@
             return value
         try:
             return float(value)
-        except:
+        except Exception:
             raise ValueError("\"%s\" isn't a valid %s!" % (value, type))
     return GetFloat
 
@@ -410,7 +410,7 @@
                 raise ValueError("Member limit can't be defined to \"unbounded\"!")
         try:
             limit = int(value)
-        except:
+        except Exception:
             raise ValueError("\"%s\" isn't a valid value for this member limit!" % value)
         if limit < 0:
             raise ValueError("Member limit can't be negative!")