0

Revert "Merge remote-tracking branch 'exhuma/master', PR #963"

This reverts commit e26727943f, reversing
changes made to 7bbb077704.
This commit is contained in:
Aaron Griffith
2013-12-02 07:40:00 -05:00
parent a8a2a191b8
commit df732bfa25
11 changed files with 165 additions and 219 deletions

View File

@@ -7,9 +7,6 @@ import traceback
import settingsDefinition
import settingsValidators
LOG = logging.getLogger(__name__)
class MissingConfigException(Exception):
"To be thrown when the config file can't be found"
pass
@@ -86,14 +83,14 @@ class MultiWorldParser(object):
except Exception, ex:
if isinstance(ex, SyntaxError):
LOG.error("Syntax error parsing %s" % settings_file)
LOG.error("The traceback below will tell you which line triggered the syntax error\n")
logging.error("Syntax error parsing %s" % settings_file)
logging.error("The traceback below will tell you which line triggered the syntax error\n")
elif isinstance(ex, NameError):
LOG.error("NameError parsing %s" % settings_file)
LOG.error("The traceback below will tell you which line referenced the non-existent variable\n")
logging.error("NameError parsing %s" % settings_file)
logging.error("The traceback below will tell you which line referenced the non-existent variable\n")
else:
LOG.error("Error parsing %s" % settings_file)
LOG.error("The traceback below will tell you which line triggered the error\n")
logging.error("Error parsing %s" % settings_file)
logging.error("The traceback below will tell you which line triggered the error\n")
# skip the execfile part of the traceback
exc_type, exc_value, exc_traceback = sys.exc_info()
@@ -105,8 +102,8 @@ class MultiWorldParser(object):
else:
if "execfile" in l: print_rest = True
# on windows, our traceback as no 'execfile'. in this case, print everything
if print_rest: LOG.error("Partial traceback:\n" + "\n".join(lines))
else: LOG.error("Partial traceback:\n" + "\n".join(formatted_lines))
if print_rest: logging.error("Partial traceback:\n" + "\n".join(lines))
else: logging.error("Partial traceback:\n" + "\n".join(formatted_lines))
sys.exit(1)
# At this point, make a pass through the file to possibly set global