Skip to content

Commit

Permalink
Merge pull request #1 from firewiremb/firewiremb-patch-2
Browse files Browse the repository at this point in the history
Fixes error in command line operation see Nickduino#25
  • Loading branch information
firewiremb authored Mar 27, 2021
2 parents bf4c019 + 5c46451 commit 7995d35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion myconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ def ReadValue(self, Entry, return_type = str, default = None, section = None, No
elif return_type == float:
return self.config.getfloat(self.Section, Entry)
elif return_type == int:
return self.config.getint(self.Section, Entry)
if self.config.get(self.Section, Entry) == 'None':
return None
else:
return self.config.getint(self.Section, Entry)
else:
self.LogErrorLine("Error in MyConfig:ReadValue: invalid type:" + str(return_type))
return default
Expand Down

0 comments on commit 7995d35

Please sign in to comment.