mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-12-06 15:43:27 +00:00
requestsync: silence possibly-used-before-assignment
pylint complains: ``` requestsync:156:34: E0606: Possibly using variable 'bug_mail_domain' before assignment (possibly-used-before-assignment) requestsync:217:27: E0606: Possibly using variable 'Distribution' before assignment (possibly-used-before-assignment) requestsync:380:8: E0606: Possibly using variable 'post_bug' before assignment (possibly-used-before-assignment) ``` These errors are false positives. So silence them. The perfect solution would be to restructure the code.
This commit is contained in:
parent
816323ea5c
commit
ef5e3d8066
@ -153,6 +153,7 @@ def main():
|
||||
import DNS # pylint: disable=import-outside-toplevel
|
||||
|
||||
DNS.DiscoverNameServers()
|
||||
# imported earlier, pylint: disable-next=possibly-used-before-assignment
|
||||
mxlist = DNS.mxlookup(bug_mail_domain)
|
||||
firstmx = mxlist[0]
|
||||
mailserver_host = firstmx[1]
|
||||
@ -214,6 +215,7 @@ def main():
|
||||
|
||||
if not args.release:
|
||||
if lpapi:
|
||||
# imported earlier, pylint: disable-next=possibly-used-before-assignment
|
||||
args.release = Distribution("ubuntu").getDevelopmentSeries().name
|
||||
else:
|
||||
ubu_info = UbuntuDistroInfo()
|
||||
@ -377,6 +379,7 @@ def main():
|
||||
# Map status to the values expected by LP API
|
||||
mapping = {"new": "New", "confirmed": "Confirmed"}
|
||||
# Post sync request using LP API
|
||||
# imported earlier, pylint: disable-next=possibly-used-before-assignment
|
||||
post_bug(srcpkg, subscribe, mapping[status], title, report)
|
||||
else:
|
||||
email_from = ubu_email(export=False)[1]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user