hpcugent / hanythingondemand

hanythingondemand provides a set of scripts to easily set up an ad-hoc Hadoop cluster through PBS jobs
https://hod.readthedocs.org
GNU General Public License v2.0
12 stars 6 forks source link

fix log statements in destroy/dists subcommands #198

Closed boegel closed 7 years ago

boegel commented 7 years ago

& get rid of unused _log in clone/genconfig

fix for issue triggered via hod destroy, introduced in #191

$ hod destroy ipython_example
Destroying HOD cluster with label 'ipython_example'...
Job ID: 3255163.master15.delcatty.gent.vsc
2017-05-08 08:43:17,138 WARNING    not available in optimized mode.DestroySubCommand MainThread  global name '_log' is not defined (global name '_log' is not defined
  File "build/bdist.linux-x86_64/egg/hod/subcommands/destroy.py", line 85, in run
    _log.debug("Matching jobs for job ID '%s': %s", jobid, pbsjobs)
)
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "build/bdist.linux-x86_64/egg/hod/main.py", line 92, in <module>
    # applications use their own logger, we need to tell them to debug or not
  File "build/bdist.linux-x86_64/egg/hod/main.py", line 80, in main
    from easybuild.framework.easyconfig import EasyConfig
  File "build/bdist.linux-x86_64/egg/hod/subcommands/destroy.py", line 124, in run
  File "build/bdist.linux-x86_64/egg/hod/subcommands/subcommand.py", line 61, in _log_and_raise
  File "build/bdist.linux-x86_64/egg/hod/subcommands/destroy.py", line 85, in run
NameError: global name '_log' is not defined (global name '_log' is not defined)