File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 18
18
19
19
20
20
def __notdltruntime ():
21
- user_namespace_keys = list (get_ipython ().user_ns .keys ())
22
- check_bool = (('create_dlt_table_fn' not in user_namespace_keys ) and ('dlt_sql_fn' not in user_namespace_keys ))
23
- return check_bool
21
+ if type (get_ipython ()) != type (None ):
22
+ user_namespace_keys = list (get_ipython ().user_ns .keys ())
23
+ check_bool = (('create_dlt_table_fn' not in user_namespace_keys ) and ('dlt_sql_fn' not in user_namespace_keys ))
24
+ return check_bool
25
+ else :
26
+ return False
24
27
25
28
26
29
def __isnotebookenv ():
@@ -70,6 +73,7 @@ def display_unavailable(df):
70
73
if __notdltruntime ():
71
74
method = get_ipython ().user_ns ['display' ]
72
75
76
+
73
77
# Under 'display' key in user_ns the original databricks display method is present
74
78
# to know more refer: /databricks/python_shell/scripts/db_ipykernel_launcher.py
75
79
def display_improvised (obj ):
You can’t perform that action at this time.
0 commit comments