autotest/autotest-docker — pull request #104 by ldoktor (2014-04-28 09:55:39+00:00)
Title: control: Prevent AttributeError in cleanup

Apparently not all modules have __name__ attribute, today I saw this exception:

sudo ./autotest-local --verbose run docker --args='docker_cli/stop'
...
11:46:23 ERROR| JOB ERROR: Unhandled AttributeError:
Traceback (most recent call last):
File "/home/medic/Work/Projekty/autotest/autotest-ldoktor/client/job.py", line 1036, in _run_step_fn
exec('__ret = %s(*__args, **__dargs)' % fn, local_vars, local_vars)
File "", line 1, in
File "/home/medic/Work/Projekty/autotest/autotest-ldoktor/client/tests/docker/control", line 169, in run_test
if module is not None and module.__name__.count('docker')]
File "/usr/lib/python2.7/site-packages/six.py", line 115, in __getattr__
raise AttributeError
AttributeError

11:46:23 INFO | END ABORT ---- ---- timestamp=1398678383 localtime=Apr 28 11:46:23 Unhandled AttributeError:
Traceback (most recent call last):
File "/home/medic/Work/Projekty/autotest/autotest-ldoktor/client/job.py", line 1036, in _run_step_fn
exec('__ret = %s(*__args, **__dargs)' % fn, local_vars, local_vars)
File "", line 1, in
File "/home/medic/Work/Projekty/autotest/autotest-ldoktor/client/tests/docker/control", line 169, in run_test
if module is not None and module.__name__.count('docker')]
File "/usr/lib/python2.7/site-packages/six.py", line 115, in __getattr__
raise AttributeError
AttributeError

btw these modules I'm talking about:

11:54:45 INFO | six.moves.BaseHTTPServer
11:54:45 INFO | six.moves.tkinter_constants
11:54:45 INFO | six.moves.html_parser
11:54:45 INFO | six.moves.winreg
11:54:45 INFO | six.moves.http_cookies
11:54:45 INFO | six.moves.tkinter_filedialog
11:54:45 INFO | six.moves.tkinter_scrolledtext
11:54:45 INFO | six.moves.tkinter_messagebox
11:54:45 INFO | six.moves.tkinter_font
11:54:45 INFO | six.moves.tkinter_ttk
11:54:45 INFO | six.moves.CGIHTTPServer
11:54:45 INFO | six.moves.http_cookiejar
11:54:45 INFO | six.moves.SimpleHTTPServer
11:54:45 INFO | six.moves.queue
11:54:45 INFO | six.moves.tkinter_colorchooser
11:54:45 INFO | six.moves.tkinter_tix
11:54:45 INFO | six.moves.tkinter
11:54:45 INFO | six.moves.reprlib
11:54:45 INFO | six.moves.tkinter_dialog
11:54:45 INFO | six.moves.tkinter_dnd
11:54:45 INFO | six.moves.tkinter_commondialog
11:54:45 INFO | six.moves.tkinter_tksimpledialog
11:54:45 INFO | six.moves.tkinter_tkfiledialog
11:54:45 INFO | six.moves.tkinter_simpledialog
11:54:45 INFO | six.moves.xmlrpc_client
11:54:45 INFO | six.moves.dbm_gnu
11:54:45 INFO | six.moves.html_entities

Regards,
Lukáš