[elbe-devel] [PATCH 07/28] pylint: fix indent complaints
Torben Hohn
torben.hohn at linutronix.de
Wed Aug 22 11:29:01 CEST 2018
pylint complains, when indent is not what it expects.
fix indent, even if that does not look so good.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/hdimg.py | 15 ++++++++-------
elbepack/rpcaptcache.py | 12 ++++++------
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index c7452ddf..3b857ea5 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -377,12 +377,13 @@ def create_partition(
g = parted.Geometry(device=disk.device, start=current_sector, length=sz)
if ptype != parted.PARTITION_EXTENDED and \
- part.text("label") in fslabel and \
- fslabel[part.text("label")].fstype == "vfat":
- fs = simple_fstype("fat32")
- ppart = parted.Partition(disk, ptype, fs, geometry=g)
- if disk.type != "gpt":
- ppart.setFlag(_ped.PARTITION_LBA)
+ part.text("label") in fslabel and \
+ fslabel[part.text("label")].fstype == "vfat":
+
+ fs = simple_fstype("fat32")
+ ppart = parted.Partition(disk, ptype, fs, geometry=g)
+ if disk.type != "gpt":
+ ppart.setFlag(_ped.PARTITION_LBA)
else:
ppart = parted.Partition(disk, ptype, geometry=g)
@@ -554,8 +555,8 @@ def add_binary_blob(outf, hd, target):
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
else:
+ # use file from /var/cache/elbe/<uuid> project dir
bf = os.path.join(target, binary.et.text)
outf.do('dd if="%s" of="%s" seek="%s" bs="%s" conv=notrunc' % (
diff --git a/elbepack/rpcaptcache.py b/elbepack/rpcaptcache.py
index a58f8ed4..908bd8fc 100644
--- a/elbepack/rpcaptcache.py
+++ b/elbepack/rpcaptcache.py
@@ -137,12 +137,12 @@ class RPCAPTCache(InChRootObject):
if p.is_installed and not \
p.is_auto_installed or \
p.is_auto_removable:
- remove = True
- for x in exclude_pkgs:
- if x == p.name:
- remove = False
- if remove:
- p.mark_delete(auto_fix=True, purge=True)
+ remove = True
+ for x in exclude_pkgs:
+ if x == p.name:
+ remove = False
+ if remove:
+ p.mark_delete(auto_fix=True, purge=True)
def mark_upgrade(self, pkgname, version):
p = self.cache[pkgname]
--
2.11.0
More information about the elbe-devel
mailing list