Menu

#1 Invalid section should give proper error

open
5
2001-06-25
2001-06-25
No

Right now, if you specify a section that doesn't exist
in your configuration file, an exception is thrown in
the script and the user is presented with a traceback.
Even though the traceback contains the correct
information to figure out what went wrong, this is
clearly not the correct behaviour for dealing with
this common error.

The code should call the ConfigParser method that
returns sections, and check to see if the requested
section is in there.

Discussion


Log in to post a comment.

Auth0 Logo