Skip to content

Commit ba4ec61

Browse files
author
Kazuki Suzuki Przyborowski
committed
Update pycatfile.py
1 parent b1855f2 commit ba4ec61

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

pycatfile.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,10 @@ def get_default_threads():
250250
if('PYCATFILE_CONFIG_FILE' in os.environ and os.path.exists(os.environ['PYCATFILE_CONFIG_FILE']) and __use_env_file__):
251251
scriptconf = os.environ['PYCATFILE_CONFIG_FILE']
252252
else:
253-
try:
254-
scriptconf = os.path.join(os.path.dirname(get_importing_script_path()), "catfile.ini")
255-
except TypeError:
253+
prescriptpath = get_importing_script_path()
254+
if(prescriptpath is not None):
255+
scriptconf = os.path.join(os.path.dirname(prescriptpath), "catfile.ini")
256+
else:
256257
scriptconf = None
257258
if os.path.exists(scriptconf):
258259
__config_file__ = scriptconf

0 commit comments

Comments
 (0)