Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import_files fails when run as a module #3

Open
mykter opened this issue Mar 12, 2015 · 0 comments
Open

import_files fails when run as a module #3

mykter opened this issue Mar 12, 2015 · 0 comments

Comments

@mykter
Copy link

mykter commented Mar 12, 2015

If the plugin has been placed in the mediagoblin plugins folder then when run with python -m from the mediagoblin folder, the import_files.py script fails to find the ini file because the path to the mediagoblin module that is returned is relative. The following little change (hack?) fixes that.

if __name__ == "__main__":
    mg_dir = os.path.dirname(mediagoblin.__path__[0])
    if mg_dir == ''":
        mg_dir = './'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant