diff options
| author | Martin Basti <mbasti@redhat.com> | 2016-10-07 15:07:49 +0200 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2016-10-11 16:50:32 +0200 |
| commit | 4628522c532c6df0295308e5f749989c2536caa6 (patch) | |
| tree | 70dab1dab7558d030f409b87e62a7bdf4680bbce /ipapython/sysrestore.py | |
| parent | 49b29591aa979560068449b78fd547915420ff08 (diff) | |
| download | freeipa-4628522c532c6df0295308e5f749989c2536caa6.tar.gz freeipa-4628522c532c6df0295308e5f749989c2536caa6.tar.xz freeipa-4628522c532c6df0295308e5f749989c2536caa6.zip | |
Pylint: fix the rest of unused local variables
Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
Diffstat (limited to 'ipapython/sysrestore.py')
| -rw-r--r-- | ipapython/sysrestore.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/ipapython/sysrestore.py b/ipapython/sysrestore.py index 4e3cccb06..2a8f44826 100644 --- a/ipapython/sysrestore.py +++ b/ipapython/sysrestore.py @@ -35,8 +35,6 @@ from six.moves.configparser import SafeConfigParser from ipaplatform.tasks import tasks from ipaplatform.paths import paths -# pylint: disable=unused-variable - if six.PY3: unicode = str @@ -118,10 +116,10 @@ class FileStore(object): root_logger.debug(" -> Not backing up - '%s' doesn't exist", path) return - (reldir, backupfile) = os.path.split(path) + _reldir, backupfile = os.path.split(path) filename = "" - for i in range(8): + for _i in range(8): h = "%02x" % self.random.randint(0,255) filename += h filename += "-"+backupfile @@ -145,8 +143,8 @@ class FileStore(object): Returns #True if the file exists in the file store, #False otherwise """ result = False - for (key, value) in self.files.items(): - (mode,uid,gid,filepath) = value.split(',', 3) + for _key, value in self.files.items(): + _mode, _uid, _gid, filepath = value.split(',', 3) if (filepath == path): result = True break @@ -264,13 +262,10 @@ class FileStore(object): if not os.path.isabs(path): raise ValueError("Absolute path required") - mode = None - uid = None - gid = None filename = None for (key, value) in self.files.items(): - (mode,uid,gid,filepath) = value.split(',', 3) + _mode, _uid, _gid, filepath = value.split(',', 3) if (filepath == path): filename = key break |
