1. Richard Lawrence
  2. schoolutils


Richard Lawrence  committed 470181f

* schoolutils/grading/ui.py: BUGFIX: BaseUI.get_config_option
- both calls to getattr() should have default values of ''
so that the value passed to a validator is always a string, if
the user doesn't provide one

  • Participants
  • Parent commits 7a754d5
  • Branches master

Comments (0)

Files changed (1)

File schoolutils/grading/ui.py

View file
  • Ignore whitespace
            supplied by the user or the user-supplied value does not
            pass validation.
-        val = (getattr(self.cli_options, option_name, None) or
-               getattr(user_config, option_name, default))
+        val = (getattr(self.cli_options, option_name, '') or
+               getattr(user_config, option_name, ''))
             return validator(val)
         except ValueError: