Before:
[21:09] bento:~% cdist
Traceback (most recent call last):
File "/home/users/nico/p/cdist/cdist/bin/../scripts/cdist", line 232, in <module>
commandline()
File "/home/users/nico/p/cdist/cdist/bin/../scripts/cdist", line 106, in commandline
args.func(args)
AttributeError: 'Namespace' object has no attribute 'func'
After:
[21:11] bento:~% cdist
usage: cdist [-h] [-d] [-v] [-V] {banner,config} ...
cdist 2.1.1-48-gfd72c60
optional arguments:
-h, --help show this help message and exit
-d, --debug Set log level to debug
-v, --verbose Set log level to info, be more verbose
-V, --version Show version
Commands:
{banner,config}
Get cdist at http://www.nico.schottelius.org/software/cdist/
[21:11] bento:~%
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
naming cdist cdist.py and running import cdist, imports itself and thus raises an interesting error:
(virtualenv)[7:47] brief:virtualenv% cdist.py
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1512, in _find_and_load_unlocked
AttributeError: 'module' object has no attribute '__path__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/virtualenv/bin/cdist.py", line 230, in <module>
commandline()
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/virtualenv/bin/cdist.py", line 27, in commandline
import cdist.banner
ImportError: No module named 'cdist.banner'; cdist is not a package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/users/nico/oeffentlich/rechner/projekte/cdist/virtualenv/bin/cdist.py", line 235, in <module>
except cdist.Error as e:
AttributeError: 'module' object has no attribute 'Error'
Also described on
http://www.velocityreviews.com/forums/t953596-error-executing-import-html-parser-from-a-script.html
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>