Skip to content

Commit

Permalink
Update pycatfile.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski committed Nov 22, 2024
1 parent 37a9e43 commit e1066d9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pycatfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,16 @@ def get_importing_script_path():

__use_pysftp__ = False
__use_alt_format__ = False
scriptconf = os.path.join(os.path.dirname(get_importing_script_path()), "catfile.ini")
__use_env_file__ = True
__use_ini_file__ = True
if('PYCATFILE_CONFIG_FILE' in os.environ and os.path.exists(os.environ['PYCATFILE_CONFIG_FILE']) and __use_env_file__):
scriptconf = os.environ['PYCATFILE_CONFIG_FILE']
else:
scriptconf = os.path.join(os.path.dirname(get_importing_script_path()), "catfile.ini")
if os.path.exists(scriptconf):
__config_file__ = scriptconf
else:
__config_file__ = os.path.join(os.path.dirname(os.path.realpath(__file__)), "catfile.ini")
__use_ini_file__ = True
if(not havepysftp):
__use_pysftp__ = False
__use_http_lib__ = "httpx"
Expand Down

0 comments on commit e1066d9

Please sign in to comment.