Skip to content

Commit e220627

Browse files
authored
Merge pull request #2 from cloudify-incubator/fix-issue
fix issue when module is not really found and it does not function
2 parents 4d0fbcb + 4dea4de commit e220627

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cloudify_importer/loader.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ def find_module(self, package_name):
7777

7878
if os.path.isdir(full_name):
7979
if not os.path.isfile(dir_root + "/" + "__init__.py"):
80-
with open(dir_root + "/" + "__init__.py", 'a+') as file:
81-
file.write("# Created by importer")
80+
try:
81+
with open(dir_root + "/" + "__init__.py", 'a+') as file:
82+
file.write("# Created by importer")
83+
except PermissionError:
84+
continue
8285
return _OurImporter(dir_root, False)
8386

8487
return _OurImporter(full_name, True)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
setup(
2020
name='cloudify-python-importer',
21-
version='0.2',
21+
version='0.2.1',
2222
author='Cloudify Team',
2323
author_email='[email protected]',
2424
description='Plugin provides Kubernetes management possibility',

0 commit comments

Comments
 (0)