flake8: apply W rules (prefering W503)
This commit is contained in:
parent
c5db34a8e1
commit
2a2c5cb729
8 changed files with 35 additions and 31 deletions
|
|
@ -988,11 +988,9 @@ def get_header_field(hdr, name, src_arch=False):
|
|||
if not SUPPORTED_OPT_DEP_HDRS.get(name, True):
|
||||
return []
|
||||
|
||||
if (src_arch and name == "ARCH"
|
||||
and get_header_field(hdr, "sourcepackage")):
|
||||
if src_arch and name == "ARCH" and get_header_field(hdr, "sourcepackage"):
|
||||
# return "src" or "nosrc" arch instead of build arch for src packages
|
||||
if (get_header_field(hdr, "nosource")
|
||||
or get_header_field(hdr, "nopatch")):
|
||||
if get_header_field(hdr, "nosource") or get_header_field(hdr, "nopatch"):
|
||||
return "nosrc"
|
||||
return "src"
|
||||
|
||||
|
|
@ -2172,8 +2170,8 @@ def is_requests_cert_error(e):
|
|||
# are way more ugly.
|
||||
errstr = str(e)
|
||||
if ('Permission denied' in errstr or # certificate not readable
|
||||
'certificate revoked' in errstr or
|
||||
'certificate expired' in errstr or
|
||||
'certificate revoked' in errstr or
|
||||
'certificate expired' in errstr or
|
||||
'certificate verify failed' in errstr):
|
||||
return True
|
||||
|
||||
|
|
|
|||
|
|
@ -118,8 +118,7 @@ def parse_task_params(method, params):
|
|||
"""
|
||||
|
||||
# check for new style
|
||||
if (len(params) == 1 and isinstance(params[0], dict)
|
||||
and '__method__' in params[0]):
|
||||
if len(params) == 1 and isinstance(params[0], dict) and '__method__' in params[0]:
|
||||
ret = params[0].copy()
|
||||
del ret['__method__']
|
||||
return ret
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue