Skip to content

Commit ac6a3ad

Browse files
committed
Resolve redefined-outer-name
1 parent fb00ae4 commit ac6a3ad

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

rpmlint/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ def lint():
172172
"""
173173
options = process_lint_args(sys.argv[1:])
174174

175-
lint = Lint(options)
176-
sys.exit(lint.run())
175+
sys.exit(Lint(options).run())
177176

178177

179178
def diff():

rpmlint/pkg.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -385,26 +385,26 @@ def cleanup(self):
385385
pass
386386

387387
def _calc_magic(self, pkgfile):
388-
magic = pkgfile.magic
389-
if not magic:
388+
magic_description = pkgfile.magic
389+
if not magic_description:
390390
if stat.S_ISDIR(pkgfile.mode):
391-
magic = 'directory'
391+
magic_description = 'directory'
392392
elif stat.S_ISLNK(pkgfile.mode):
393-
magic = "symbolic link to `%s'" % pkgfile.linkto
393+
magic_description = "symbolic link to `%s'" % pkgfile.linkto
394394
elif not pkgfile.size:
395-
magic = 'empty'
396-
if not magic and not pkgfile.is_ghost and has_magic:
395+
magic_description = 'empty'
396+
if not magic_description and not pkgfile.is_ghost and has_magic:
397397
start = time.monotonic()
398-
magic = get_magic(pkgfile.path)
398+
magic_description = get_magic(pkgfile.path)
399399
self.timers['libmagic'] += time.monotonic() - start
400-
if magic is None or Pkg._magic_from_compressed_re.search(magic):
400+
if magic_description is None or Pkg._magic_from_compressed_re.search(magic_description):
401401
# Discard magic from inside compressed files ('file -z')
402402
# until PkgFile gets decompression support. We may get
403403
# such magic strings from package headers already now;
404404
# for example Fedora's rpmbuild as of F-11's 4.7.1 is
405405
# patched so it generates them.
406-
magic = ''
407-
return magic
406+
magic_description = ''
407+
return magic_description
408408

409409
# internal function to gather dependency info used by the above ones
410410
def _gather_aux(self, header, xs, nametag, flagstag, versiontag,

0 commit comments

Comments
 (0)