Commits

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

Comments (0)

Files changed (1)

File schoolutils/grading/ui.py

            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, ''))
         try:
             return validator(val)
         except ValueError: