File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,12 @@ def do_command(args):
44
44
response = request .post ().resource (uri ).content (json .dumps (options )).send ()
45
45
46
46
# get job status
47
- job_resource = re .sub (r'http.*\/ws' , r'' , response .headers ['Location' ])
47
+ location = None
48
+ if 'Location' in response .headers :
49
+ location = response .headers ['Location' ]
50
+ elif 'location' in response .headers :
51
+ location = response .headers ['location' ]
52
+ job_resource = re .sub (r'http.*\/ws' , r'' , location )
48
53
request = client .new_request ()
49
54
request .fail_on_error ().accept_json ()
50
55
if args .verbose :
Original file line number Diff line number Diff line change @@ -45,7 +45,12 @@ def do_command(args):
45
45
response = request .post ().resource (uri ).content (json .dumps (options )).send ()
46
46
47
47
# get job status
48
- job_resource = re .sub (r'http.*\/ws' , r'' , response .headers ['Location' ])
48
+ location = None
49
+ if 'Location' in response .headers :
50
+ location = response .headers ['Location' ]
51
+ elif 'location' in response .headers :
52
+ location = response .headers ['location' ]
53
+ job_resource = re .sub (r'http.*\/ws' , r'' , location )
49
54
request = client .new_request ()
50
55
request .fail_on_error ().accept_json ()
51
56
if args .verbose :
You can’t perform that action at this time.
0 commit comments