Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

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

Description

@deiferni

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions