Skip to content

Commit 19b1d35

Browse files
committed
Combine error exception
1 parent e113672 commit 19b1d35

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

channelfinder/cfPropertyManager/CFPropertyManager.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ def __getDefaultConfig(arg, value):
160160
if value is None:
161161
try:
162162
return basecfg.get("DEFAULT", arg)
163-
except KeyError:
164-
return None
165-
except NoSectionError:
163+
except (KeyError, NoSectionError):
166164
return None
167165
else:
168166
return value

channelfinder/cfUpdate/CFUpdateIOC.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,7 @@ def __getDefaultConfig(arg, value):
275275
if value is None:
276276
try:
277277
return basecfg.get("DEFAULT", arg)
278-
except KeyError:
279-
return None
280-
except NoSectionError:
278+
except (KeyError, NoSectionError):
281279
return None
282280
else:
283281
return value

0 commit comments

Comments
 (0)