Index: rietveld.py |
diff --git a/rietveld.py b/rietveld.py |
index d4ac39bab08060ea3c6414d3b9ad32b986d266f0..d6d358b0dd0119d0af5076fe550bc432df861100 100644 |
--- a/rietveld.py |
+++ b/rietveld.py |
@@ -77,23 +77,23 @@ class Rietveld(object): |
def close_issue(self, issue): |
"""Closes the Rietveld issue for this changelist.""" |
- logging.info('closing issue %d' % issue) |
- self.post("/%d/close" % issue, [('xsrf_token', self.xsrf_token())]) |
+ logging.info('closing issue %s' % issue) |
M-A Ruel
2012/11/28 02:43:49
Please don't change these and revert everything in
Isaac (away)
2012/11/28 22:28:17
OK... I thought you asked for that earlier when y
|
+ self.post("/%s/close" % issue, [('xsrf_token', self.xsrf_token())]) |
def get_description(self, issue): |
"""Returns the issue's description.""" |
- return self.get('/%d/description' % issue) |
+ return self.get('/%s/description' % issue) |
def get_issue_properties(self, issue, messages): |
"""Returns all the issue's metadata as a dictionary.""" |
- url = '/api/%d' % issue |
+ url = '/api/%s' % issue |
if messages: |
url += '?messages=true' |
return json.loads(self.get(url)) |
def get_patchset_properties(self, issue, patchset): |
"""Returns the patchset properties.""" |
- url = '/api/%d/%d' % (issue, patchset) |
+ url = '/api/%s/%s' % (issue, patchset) |
return json.loads(self.get(url)) |
def get_file_content(self, issue, patchset, item): |
@@ -103,7 +103,7 @@ class Rietveld(object): |
""" |
# content = 0 is the old file, 1 is the new file. |
content = 1 |
- url = '/%d/binary/%d/%d/%d' % (issue, patchset, item, content) |
+ url = '/%s/binary/%s/%d/%d' % (issue, patchset, item, content) |
return self.get(url) |
def get_file_diff(self, issue, patchset, item): |
@@ -111,7 +111,7 @@ class Rietveld(object): |
Returns a useless diff for binary files. |
""" |
- url = '/download/issue%d_%d_%d.diff' % (issue, patchset, item) |
+ url = '/download/issue%s_%s_%d.diff' % (issue, patchset, item) |
return self.get(url) |
def get_patch(self, issue, patchset): |
@@ -235,8 +235,8 @@ class Rietveld(object): |
def update_description(self, issue, description): |
"""Sets the description for an issue on Rietveld.""" |
- logging.info('new description for issue %d' % issue) |
- self.post('/%d/description' % issue, [ |
+ logging.info('new description for issue %s' % issue) |
+ self.post('/%s/description' % issue, [ |
('description', description), |
('xsrf_token', self.xsrf_token())]) |
@@ -245,8 +245,8 @@ class Rietveld(object): |
tail = '…\n(message too large)' |
if len(message) > max_message: |
message = message[:max_message-len(tail)] + tail |
- logging.info('issue %d; comment: %s' % (issue, message)) |
- return self.post('/%d/publish' % issue, [ |
+ logging.info('issue %s; comment: %s' % (issue, message)) |
+ return self.post('/%s/publish' % issue, [ |
('xsrf_token', self.xsrf_token()), |
('message', message), |
('message_only', 'True'), |
@@ -255,7 +255,7 @@ class Rietveld(object): |
('no_redirect', 'True')]) |
def set_flag(self, issue, patchset, flag, value): |
- return self.post('/%d/edit_flags' % issue, [ |
+ return self.post('/%s/edit_flags' % issue, [ |
('last_patchset', str(patchset)), |
('xsrf_token', self.xsrf_token()), |
(flag, value)]) |
@@ -334,7 +334,7 @@ class Rietveld(object): |
] |
if revision: |
params.append(('revision', revision)) |
- return self.post('/%d/try/%d' % (issue, patchset), params) |
+ return self.post('/%s/try/%s' % (issue, patchset), params) |
def get_pending_try_jobs(self, cursor=None, limit=100): |
"""Retrieves the try job requests in pending state. |