Skip to content

Commit

Permalink
Merge pull request #2 from cloudify-incubator/fix-issue
Browse files Browse the repository at this point in the history
fix issue when module is not really found and it does not function
  • Loading branch information
EarthmanT authored Dec 13, 2022
2 parents 4d0fbcb + 4dea4de commit e220627
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions cloudify_importer/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ def find_module(self, package_name):

if os.path.isdir(full_name):
if not os.path.isfile(dir_root + "/" + "__init__.py"):
with open(dir_root + "/" + "__init__.py", 'a+') as file:
file.write("# Created by importer")
try:
with open(dir_root + "/" + "__init__.py", 'a+') as file:
file.write("# Created by importer")
except PermissionError:
continue
return _OurImporter(dir_root, False)

return _OurImporter(full_name, True)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

setup(
name='cloudify-python-importer',
version='0.2',
version='0.2.1',
author='Cloudify Team',
author_email='[email protected]',
description='Plugin provides Kubernetes management possibility',
Expand Down

0 comments on commit e220627

Please sign in to comment.