Skip to content

Commit

Permalink
add jira_server as function parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
andylytical committed Sep 12, 2024
1 parent ab9eb31 commit 7e76851
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions jiracmdline/libjira.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
resources = {}


def jira_login( token=None, username=None, passwd=None ):
try:
jira_server = os.environ[ 'JIRA_SERVER' ]
except KeyError as e:
raise UserWarning( 'Jira Server missing. Set JIRA_SERVER environment variable' )
def jira_login( token=None, jira_server=None, username=None, passwd=None ):
if not jira_server:
try:
jira_server = os.environ[ 'JIRA_SERVER' ]
except KeyError as e:
raise UserWarning( 'Jira Server missing. Set JIRA_SERVER environment variable' )
params = {
'server': f'https://{jira_server}',
'validate': True,
Expand Down

0 comments on commit 7e76851

Please sign in to comment.