Skip to content

Commit 59e39cc

Browse files
author
Adam Richie-Halford
committed
v0.2.1 Fix code_context error on cloudknot import
1 parent 80c7742 commit 59e39cc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cloudknot/__init__.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@
3030
"cloudknot."
3131
)
3232

33-
conf_context = "load_entry_point('cloudknot', 'console_scripts', 'cloudknot')"
3433
try:
35-
imported_from_config = (conf_context in inspect.stack()[-1].code_context[0])
34+
context = inspect.stack()[-1].code_context
3635
except AttributeError:
37-
imported_from_config = (conf_context in inspect.stack()[-1][-2][0])
36+
context = inspect.stack()[-1][-2]
37+
38+
conf_context = "load_entry_point('cloudknot', 'console_scripts', 'cloudknot')"
39+
imported_from_config = context is not None and conf_context in context[0]
3840

3941
if not imported_from_config:
4042
config_file = config.get_config_file()

cloudknot/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z"
66
_version_major = 0
77
_version_minor = 2
8-
_version_micro = '' # use '' for first of series, number for 1 and above
8+
_version_micro = 1 # use '' for first of series, number for 1 and above
99
# _version_extra = 'dev'
1010
_version_extra = '' # Uncomment this for full releases
1111

0 commit comments

Comments
 (0)