repopick: Clear Pyright warnings
Change-Id: I63962cc31820329a0fcf8ed96a13ef12a9f67875
This commit is contained in:
committed by
Bruno Martins
parent
ce64349c54
commit
12c5c7233e
@@ -57,10 +57,10 @@ def fetch_query_via_ssh(remote_url, query):
|
|||||||
We have to get the data, then transform it to match what we're expecting from the HTTP RESET API
|
We have to get the data, then transform it to match what we're expecting from the HTTP RESET API
|
||||||
"""
|
"""
|
||||||
if remote_url.count(":") == 2:
|
if remote_url.count(":") == 2:
|
||||||
(uri, userhost, port) = remote_url.split(":")
|
(_, userhost, port) = remote_url.split(":")
|
||||||
userhost = userhost[2:]
|
userhost = userhost[2:]
|
||||||
elif remote_url.count(":") == 1:
|
elif remote_url.count(":") == 1:
|
||||||
(uri, userhost) = remote_url.split(":")
|
(_, userhost) = remote_url.split(":")
|
||||||
userhost = userhost[2:]
|
userhost = userhost[2:]
|
||||||
port = "29418"
|
port = "29418"
|
||||||
else:
|
else:
|
||||||
@@ -117,7 +117,7 @@ def fetch_query_via_ssh(remote_url, query):
|
|||||||
"status": data["status"],
|
"status": data["status"],
|
||||||
}
|
}
|
||||||
reviews.append(review)
|
reviews.append(review)
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
return reviews
|
return reviews
|
||||||
|
|
||||||
@@ -376,6 +376,8 @@ def main():
|
|||||||
projects = xml_root.findall("project")
|
projects = xml_root.findall("project")
|
||||||
remotes = xml_root.findall("remote")
|
remotes = xml_root.findall("remote")
|
||||||
default_revision = xml_root.findall("default")[0].get("revision")
|
default_revision = xml_root.findall("default")[0].get("revision")
|
||||||
|
if not default_revision:
|
||||||
|
raise ValueError("Failed to get revision from manifest")
|
||||||
|
|
||||||
# dump project data into the a list of dicts with the following data:
|
# dump project data into the a list of dicts with the following data:
|
||||||
# {project: {path, revision}}
|
# {project: {path, revision}}
|
||||||
@@ -534,7 +536,8 @@ def main():
|
|||||||
item["revision"] = x
|
item["revision"] = x
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
args.quiet or print(
|
if not args.quiet:
|
||||||
|
print(
|
||||||
"ERROR: The patch set {0}/{1} could not be found, using CURRENT_REVISION instead.".format(
|
"ERROR: The patch set {0}/{1} could not be found, using CURRENT_REVISION instead.".format(
|
||||||
change, patchset
|
change, patchset
|
||||||
)
|
)
|
||||||
@@ -665,7 +668,8 @@ def do_git_fetch_pull(args, item):
|
|||||||
|
|
||||||
|
|
||||||
def apply_change(args, item):
|
def apply_change(args, item):
|
||||||
args.quiet or print("Applying change number {0}...".format(item["id"]))
|
if not args.quiet:
|
||||||
|
print("Applying change number {0}...".format(item["id"]))
|
||||||
if is_closed(item["status"]):
|
if is_closed(item["status"]):
|
||||||
print("!! Force-picking a closed change !!\n")
|
print("!! Force-picking a closed change !!\n")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user