Skip to content

Commit 5aaeb61

Browse files
committed
revise auth file path computation
1 parent a29fe24 commit 5aaeb61

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

irods/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ def env_filename_from_keyword_args(kwargs):
1313
env_file = os.path.expanduser('~/.irods/irods_environment.json')
1414
return env_file
1515

16-
def derived_auth_filename(env_file):
17-
return '' if not env_file else os.path.join(os.path.dirname(env_file),'.irodsA')
16+
def derived_auth_filename(env_filename):
17+
if not env_filename:
18+
return ''
19+
default_irods_authentication_file = os.path.join(os.path.dirname(env_file),'.irodsA')
20+
return os.environ.get('IRODS_AUTHENTICATION_FILE', default_irods_authentication_file)
1821

1922
# This has no effect if basicConfig() was previously called.
2023
logging.basicConfig()

0 commit comments

Comments
 (0)