mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 09:26:14 +01:00
Remove superfluous parens
This commit is contained in:
parent
3296fd8d89
commit
6d891d7488
@ -69,7 +69,7 @@ class Checker:
|
||||
if line[0:12] == "-----END PGP":
|
||||
break
|
||||
line = line.rstrip()
|
||||
if (line[0] == '='):
|
||||
if line[0] == '=':
|
||||
crc = line[1:]
|
||||
line = fd.readline()
|
||||
break
|
||||
|
@ -6942,7 +6942,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
command = args[0]
|
||||
|
||||
if not (command in ( 'runall', 'ra', 'run', 'localrun', 'manualrun', 'disabledrun', 'remoterun', 'lr', 'dr', 'mr', 'rr', 'merge', 'wait' )):
|
||||
if command not in ('runall', 'ra', 'run', 'localrun', 'manualrun', 'disabledrun', 'remoterun', 'lr', 'dr', 'mr', 'rr', 'merge', 'wait'):
|
||||
raise oscerr.WrongArgs('Wrong command given.')
|
||||
|
||||
if command == "remoterun" or command == "rr":
|
||||
@ -9327,7 +9327,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
or inspect.ismodule(data)):
|
||||
setattr(self.__class__, name, data)
|
||||
except (SyntaxError, NameError, ImportError) as e:
|
||||
if (os.environ.get('OSC_PLUGIN_FAIL_IGNORE')):
|
||||
if os.environ.get('OSC_PLUGIN_FAIL_IGNORE'):
|
||||
print("%s: %s\n" % (os.path.join(plugin_dir, extfile), e), file=sys.stderr)
|
||||
else:
|
||||
import traceback
|
||||
|
@ -44,7 +44,7 @@ class MockRequest:
|
||||
return self.headers.get(header_name, default)
|
||||
|
||||
def has_header(self, header_name):
|
||||
return (header_name in self.headers)
|
||||
return header_name in self.headers
|
||||
|
||||
def add_unredirected_header(self, key, val):
|
||||
# modifies the `headers` variable that was passed to object's constructor
|
||||
|
@ -6862,7 +6862,7 @@ def owner(apiurl, search_term=None, mode="binary", attribute=None,
|
||||
"""
|
||||
|
||||
# binary is just for API backward compatibility
|
||||
if not ((search_term is None) ^ (binary is None)):
|
||||
if not (search_term is None) ^ (binary is None):
|
||||
raise ValueError('Either specify search_term or binary')
|
||||
elif binary is not None:
|
||||
search_term = binary
|
||||
|
@ -169,7 +169,7 @@ class Ar:
|
||||
if data != b'!<arch>':
|
||||
raise ArError(self.filename, 'no ar archive')
|
||||
pos = 8
|
||||
while (len(data) != 0):
|
||||
while len(data) != 0:
|
||||
self.__file.seek(pos, os.SEEK_SET)
|
||||
data = self.__file.read(self.hdr_len)
|
||||
if not data:
|
||||
|
@ -153,7 +153,7 @@ class CpioRead:
|
||||
if not self.format in self.sfmt.values():
|
||||
raise CpioError(self.filename, '\'%s\' is not a supported cpio format' % self.format)
|
||||
pos = 0
|
||||
while (len(data) != 0):
|
||||
while len(data) != 0:
|
||||
self.__file.seek(pos, os.SEEK_SET)
|
||||
data = self.__file.read(self.hdr_len)
|
||||
if not data:
|
||||
|
Loading…
Reference in New Issue
Block a user