pylons icon indicating copy to clipboard operation
pylons copied to clipboard

"paster shell my.ini" fails when lib folder is present but base.py is missing

Open deiferni opened this issue 14 years ago • 0 comments

recently we moved "ourproject.lib.base.py" to a sub-package inside the "ourproject.lib" package. This causes a "paster shell my.ini" to fail with:

Traceback (most recent call last): File "/Users/deif/Library/VirtualEnv/sv11_py27/bin/paster", line 8, in load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')() File "/Users/deif/Library/VirtualEnv/sv11_py27/lib/python2.7/site-packages/paste/script/command.py", line 84, in run invoke(command, command_name, options, args[1:]) File "/Users/deif/Library/VirtualEnv/sv11_py27/lib/python2.7/site-packages/paste/script/command.py", line 123, in invoke exit_code = runner.run(args) File "/Users/deif/Library/VirtualEnv/sv11_py27/lib/python2.7/site-packages/paste/script/command.py", line 218, in run result = self.command() File "/Users/deif/Library/VirtualEnv/sv11_py27/lib/python2.7/site-packages/pylons/commands.py", line 538, in command import(base_module) ImportError: No module named base

I think the bug lies in pylons.commands.is_minimal_template that checks the importerror against the string 'No module named lib.base' but should also check against 'No module named base'. the latter error is raised when the lib package exists but not the base module.

cheers

deiferni avatar Apr 18 '11 13:04 deiferni