summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@lfos.de>2016-04-03 10:05:03 +0200
committerLukas Fleischer <lfleischer@lfos.de>2016-04-03 10:05:03 +0200
commitb0d74c0224e1322cc4563a9123dc80e65cd27fc4 (patch)
tree64e5f44ec5bbe7552a6702d7fa1d854a9597040b
parent97ea536c1ad192a0863e74fd3a9d2779d134b0d5 (diff)
downloadaurdupes-master.tar.gz
aurdupes-master.zip
Fix some issues reported by pylintHEADmaster
Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
-rwxr-xr-xaurdupes.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/aurdupes.py b/aurdupes.py
index 6942d45..91b23c8 100755
--- a/aurdupes.py
+++ b/aurdupes.py
@@ -37,9 +37,8 @@ if not (args.list_dupes or args.list_vcs or args.list_alias):
if args.repos:
repos = args.repos
-def get_pkgaliases(pkgname):
- global args
+def get_pkgaliases(pkgname):
aliases = []
if args.list_dupes or args.list_alias:
@@ -57,6 +56,7 @@ def get_pkgaliases(pkgname):
return aliases
+
def get_aurpkglist(list_uri, pkgpage_uri):
pkglist = collections.defaultdict(list)
pkgdata = gzip.GzipFile(fileobj=urllib.request.urlopen(list_uri))
@@ -67,6 +67,7 @@ def get_aurpkglist(list_uri, pkgpage_uri):
pkglist[pkgalias].append(pkgname + ' ' + pkglink)
return pkglist
+
def get_alpmpkglist(repos):
handle = pyalpm.Handle('/', '/var/lib/pacman/')
for repo in repos:
@@ -80,6 +81,7 @@ def get_alpmpkglist(repos):
pkglist[pkgalias].append(pkg.name + ' [' + syncdb.name + ']')
return pkglist
+
pkglist = get_alpmpkglist(repos)
aurpkglist = get_aurpkglist(args.aurpkglist_uri, args.aurpkgpage_uri).items()
for pkgname, pkglink in aurpkglist: