From d08f139c22faa1db32c62ddc165d471f2cc0c489 Mon Sep 17 00:00:00 2001 From: Nick Daly Date: Sun, 10 Nov 2013 21:49:55 -0600 Subject: [PATCH] Made errors more Python version-independent. --- cfg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cfg.py b/cfg.py index 247b5d7e6..013a5bdff 100644 --- a/cfg.py +++ b/cfg.py @@ -1,12 +1,13 @@ from menu import Menu import os +import ConfigParser from ConfigParser import SafeConfigParser def get_item(parser, section, name): try: return parser.get(section, name) - except (SafeConfigParser.NoSectionError, SafeConfigParser.NoOptionError): + except (ConfigParser.NoSectionError, ConfigParser.NoOptionError): print ("The config file {} does not contain the {}.{} option.".format( parser[0], section, name)) raise