[elbe-devel] [PATCH 38/40] pylint: fstab - rename variables
Manuel Traut
manut at linutronix.de
Fri Sep 14 13:56:50 CEST 2018
to avoid
fstab.py:46, PyLint, Priority: Normal
Redefining name 'fstabentry' from outer scope (line 72)
fstab.py:76, PyLint, Priority: Normal
Redefining built-in 'id'
Signed-off-by: Manuel Traut <manut at linutronix.de>
---
elbepack/fstab.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/elbepack/fstab.py b/elbepack/fstab.py
index 5e9bb8de..d81b9528 100644
--- a/elbepack/fstab.py
+++ b/elbepack/fstab.py
@@ -43,14 +43,14 @@ class mountpoint_dict (dict):
dict.__init__(self)
self.id_count = 0
- def register(self, fstabentry):
- mp = fstabentry.mountpoint
+ def register(self, fstab_entry):
+ mp = fstab_entry.mountpoint
if mp in self:
- fstabentry.id = self[mp].id
+ fstab_entry.id = self[mp].id
else:
- fstabentry.id = str(self.id_count)
- self[mp] = fstabentry
+ fstab_entry.id = str(self.id_count)
+ self[mp] = fstab_entry
self.id_count += 1
@staticmethod
@@ -73,7 +73,7 @@ class fstabentry(object):
# pylint: disable=too-many-instance-attributes
- def __init__(self, xml, entry, id=0):
+ def __init__(self, xml, entry, fsid=0):
if entry.has("source"):
self.source = entry.text("source")
else:
@@ -97,7 +97,7 @@ class fstabentry(object):
self.partnum = 0
self.number = ''
- self.id = str(id)
+ self.id = str(fsid)
def get_str(self):
return "%s %s %s %s 0 %s\n" % (self.source, self.mountpoint,
--
2.19.0.rc2
More information about the elbe-devel
mailing list