Skip to content

Commit

Permalink
Exception.message doesn't work in python 2.4 (closes #320)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlo Cabanilla committed Dec 28, 2012
1 parent 14e990f commit c3b9648
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_config_path(cfg_path=None, os_name=None):
return os.path.join(path, DATADOG_CONF)

# If all searches fail, exit the agent with an error
sys.stderr.write("Please supply a configuration file at %s or in the directory where the agent is currently deployed.\n" % exc.message)
sys.stderr.write("Please supply a configuration file at %s or in the directory where the agent is currently deployed.\n" % str(exc))
sys.exit(3)

def get_config(parse_args = True, cfg_path=None, init_logging=False, options=None):
Expand Down Expand Up @@ -421,7 +421,7 @@ def get_confd_path(osname):
if os.path.exists(cur_path):
return cur_path

log.error("No conf.d folder found at '%s' or in the directory where the agent is currently deployed.\n" % exc.message)
log.error("No conf.d folder found at '%s' or in the directory where the agent is currently deployed.\n" % str(exc))
sys.exit(3)

def get_checksd_path(osname):
Expand All @@ -438,7 +438,7 @@ def get_checksd_path(osname):
try:
return _windows_checksd_path()
except PathNotFound, e:
log.error("No checks.d folder found in '%s'.\n" % e.message)
log.error("No checks.d folder found in '%s'.\n" % str(e))

log.error("No checks.d folder at '%s'.\n" % checksd_path)
sys.exit(3)
Expand Down

0 comments on commit c3b9648

Please sign in to comment.