Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and lechat committed Aug 19, 2023
1 parent 5929fc4 commit 231cea3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jenkinsapi/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def modify_scm_url(self, new_source_url, old_source_url=None):
def get_config_xml_url(self):
return "%s/config.xml" % self.baseurl

def update_config(self, config, full_response=False, encoding='utf-8'):
def update_config(self, config, full_response=False, encoding="utf-8"):
"""
Update the config.xml to the job
Also refresh the ElementTree object since the config has changed
Expand All @@ -637,7 +637,9 @@ def update_config(self, config, full_response=False, encoding='utf-8'):
"""
url = self.get_config_xml_url()
config = str(config) # cast unicode in case of Python 2
response = self.jenkins.requester.post_url(url, params={}, data=config.encode(encoding))
response = self.jenkins.requester.post_url(
url, params={}, data=config.encode(encoding)
)
self._element_tree = ET.fromstring(config)

if full_response:
Expand Down

0 comments on commit 231cea3

Please sign in to comment.