[elbe-devel] [PATCH 01/28] pylint: fix unnecessary parenthesis warnings
Torben Hohn
torben.hohn at linutronix.de
Wed Aug 22 11:28:55 CEST 2018
pylint complains about unuecessary parenthesis.
remove them.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/aptprogress.py | 2 +-
elbepack/elbexml.py | 6 +++---
elbepack/hdimg.py | 2 +-
elbepack/pbuilder.py | 2 +-
elbepack/soapclient.py | 6 +++---
elbepack/treeutils.py | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/elbepack/aptprogress.py b/elbepack/aptprogress.py
index 4710163f..8118c262 100644
--- a/elbepack/aptprogress.py
+++ b/elbepack/aptprogress.py
@@ -49,7 +49,7 @@ class ElbeInstallProgress (InstallProgress):
def fork(self):
retval = os.fork()
- if (retval):
+ if retval:
self.child_pid = retval
return retval
diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
index c60b7d8a..f6321688 100644
--- a/elbepack/elbexml.py
+++ b/elbepack/elbexml.py
@@ -93,13 +93,13 @@ class ElbeXML(object):
target = self.text("project/buildimage/arch", key="arch")
- if (host_arch == target):
+ if host_arch == target:
return False
- if ((host_arch == "amd64") and (target == "i386")):
+ if (host_arch == "amd64") and (target == "i386"):
return False
- if ((host_arch == "armhf") and (target == "armel")):
+ if (host_arch == "armhf") and (target == "armel"):
return False
return True
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index 26dcce50..1704ee24 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -548,7 +548,7 @@ def add_binary_blob(outf, hd, target):
bs = 1
# use file from target/ dir if binary path starts with /
- if (binary.et.text[0] == '/'):
+ if binary.et.text[0] == '/':
bf = os.path.join(target, 'target', binary.et.text[1:])
print(bf)
# else use file from /var/cache/elbe/<uuid> project dir
diff --git a/elbepack/pbuilder.py b/elbepack/pbuilder.py
index c101b285..f334d8be 100644
--- a/elbepack/pbuilder.py
+++ b/elbepack/pbuilder.py
@@ -44,7 +44,7 @@ def pbuilder_write_config(builddir, xml, _log):
fp.write('HOOKDIR="%s"\n' % os.path.join(builddir, 'pbuilder', 'hooks.d'))
fp.write('PATH="/usr/share/elbe/qemu-elbe:$PATH"\n')
- if (xml.text("project/arch", key="arch") != 'amd64'):
+ if xml.text("project/arch", key="arch") != 'amd64':
fp.write('ARCHITECTURE="%s"\n' %
xml.text("project/buildimage/arch", key="arch"))
fp.write('DEBOOTSTRAP="qemu-debootstrap"\n')
diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index 4963ed1c..2490df0a 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -311,7 +311,7 @@ class SetXmlAction(ClientAction):
size = 1024 * 1024
part = 0
with open(filename, "rb") as fp:
- while (True):
+ while True:
xml_base64 = binascii.b2a_base64(fp.read(size))
# finish upload
if len(xml_base64) == 1:
@@ -581,7 +581,7 @@ class WaitProjectBusyAction(ClientAction):
# for some reasons lines containing e.g. ^H result in a None
# object here. let's just skip those strange lines for the
# moment
- if (busy):
+ if busy:
log = busy.split('###')
if part != int(log[0]):
@@ -851,7 +851,7 @@ class UploadPackageAction(RepoAction):
size = 1024 * 1024
part = 0
with open(f, "rb") as fp:
- while (True):
+ while True:
xml_base64 = binascii.b2a_base64(fp.read(size))
# finish upload
if len(xml_base64) == 1:
diff --git a/elbepack/treeutils.py b/elbepack/treeutils.py
index 5b5430cd..a1af18ee 100644
--- a/elbepack/treeutils.py
+++ b/elbepack/treeutils.py
@@ -69,7 +69,7 @@ class ebase(object):
return eiter(iter(self.et))
def has(self, path):
- return not (self.et.find(path) is None)
+ return not self.et.find(path) is None
def set_text(self, text):
self.et.text = text
--
2.11.0
More information about the elbe-devel
mailing list