Skip to content

Commit

Permalink
fix #185; allow multiple users in the same python script by copying t…
Browse files Browse the repository at this point in the history
…he RALLY_REST_HEADERS
  • Loading branch information
Xianting Lu committed Feb 11, 2022
1 parent 6f6e360 commit 521d9c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyral/restapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ def __init__(self, server=SERVER, user=None, password=None, apikey=None,
## print("\n requests lib in %s" % requests.__file__)
##
self.session = requests.Session()
self.session.headers = RALLY_REST_HEADERS
self.session.headers = RALLY_REST_HEADERS.copy()

if 'headers' in kwargs:
for header_name, header_value in kwargs['headers'].items():
matching_header = [key for key in self.session.headers
Expand Down

0 comments on commit 521d9c5

Please sign in to comment.