Commit d7e241a2 authored by Andrii Shyshkalov's avatar Andrii Shyshkalov Committed by Commit Bot

bot_update: fix minor pylint issues.

Change-Id: I2f500bb8089039e689d5a989eb77f91374528164
Reviewed-on: https://chromium-review.googlesource.com/771381Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
parent 96187e53
......@@ -21,7 +21,6 @@ PROPERTIES = {
# Gerrit patches will have all properties about them prefixed with patch_.
'patch_issue': Property(default=None), # TODO(tandrii): add kind=int.
'patch_set': Property(default=None), # TODO(tandrii): add kind=int.
'patch_project': Property(default=None), # Also used by Rietveld.
'patch_gerrit_url': Property(default=None),
'patch_repository_url': Property(default=None),
'patch_ref': Property(default=None),
......
......@@ -10,7 +10,7 @@ from recipe_engine import recipe_api
class BotUpdateApi(recipe_api.RecipeApi):
def __init__(self, issue, patch_issue, patchset, patch_set, patch_project,
def __init__(self, issue, patch_issue, patchset, patch_set,
repository, patch_repository_url, gerrit_ref, patch_ref,
patch_gerrit_url, rietveld, revision, parent_got_revision,
deps_revision_overrides, fail_patch, *args, **kwargs):
......
......@@ -379,12 +379,12 @@ def normalize_git_url(url):
if not p.netloc.endswith('.googlesource.com'):
# Not a googlesource.com URL, can't normalize this, just return as is.
return url
path = p.path
if path.startswith('/a'):
path = path[len('/a'):]
if path.endswith('.git'):
path = path[:-len('.git')]
return 'https://%s%s' % (p.netloc, path)
upath = p.path
if upath.startswith('/a'):
upath = upath[len('/a'):]
if upath.endswith('.git'):
upath = upath[:-len('.git')]
return 'https://%s%s' % (p.netloc, upath)
# TODO(hinoka): Remove this once all downstream recipes stop using this format.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment