1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-23 22:52:33 +01:00

Also catch AttributeErrors when guessing data types

This commit is contained in:
Adam Blackburn
2009-05-01 13:41:13 +08:00
parent 531cde7250
commit 51c6ef0f0e

View File

@@ -108,7 +108,7 @@ class ConfigManager(RawConfigParser):
try:
if not ret.startswith('0') or len(ret) == 1:
ret = int(ret)
except (ValueError, TypeError):
except (ValueError, TypeError, AttributeError):
ret = Noneify(ret)
# This is a workaround for a python-dbus issue on 64-bit systems.
if isinstance(ret, (int)):