stagingapi: save_file_content() provide comment optional parameter.

This commit is contained in:
Jimmy Berry 2017-05-12 00:37:02 -05:00
parent 88e055b696
commit 8996c4c2ab

View File

@ -1351,7 +1351,7 @@ class StagingAPI(object):
except urllib2.HTTPError:
return None
def save_file_content(self, project, package, filename, content):
def save_file_content(self, project, package, filename, content, comment='script updated'):
"""
Save content to a project/package/file
:param project: The project containing the package
@ -1359,8 +1359,8 @@ class StagingAPI(object):
:param filename: the filename to save the data to
:param content: the content to write to the file
"""
url = self.makeurl(['source', project, package, filename])
http_PUT(url + '?comment=scripted+update', data=content)
url = self.makeurl(['source', project, package, filename], {'comment': comment})
http_PUT(url, data=content)
def update_status_or_deactivate(self, project, command):
meta = self.get_prj_pseudometa(project)