aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2012-12-16 06:07:24 +0800
committereadler <eadler@FreeBSD.org>2012-12-16 06:07:24 +0800
commit723f10a623f0dd57fc1af8127b9dae98f7ee22cf (patch)
tree6e91976c4da5b07a9a928f40d2883f2b4c9b572d /Tools/scripts
parent1dcc825b9676e9d4ff1e566ed3ead4929b3677ab (diff)
downloadfreebsd-ports-gnome-723f10a623f0dd57fc1af8127b9dae98f7ee22cf.tar.gz
freebsd-ports-gnome-723f10a623f0dd57fc1af8127b9dae98f7ee22cf.tar.zst
freebsd-ports-gnome-723f10a623f0dd57fc1af8127b9dae98f7ee22cf.zip
Covert gnomedepends.py from Python 2 to Python 3.
No objections from: sobomax
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/gnomedepends.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Tools/scripts/gnomedepends.py b/Tools/scripts/gnomedepends.py
index 9cb6268ca1c7..d83173b11326 100755
--- a/Tools/scripts/gnomedepends.py
+++ b/Tools/scripts/gnomedepends.py
@@ -69,7 +69,7 @@ regobj = re.compile('^@dirrm (?P<dirname>\S+).*$')
for portdir in gnomeports:
try:
lines = readfile(os.path.join(portdir, 'pkg-plist'))
- lines = filter(lines, regobj)
+ lines = list(filter(lines, regobj))
if len(lines) > 0:
newgnomeports.append([portdir, lines])
except IOError:
@@ -79,14 +79,14 @@ newgnomeports = []
try:
currplist = readfile('pkg-plist')
-except IOError, errmsg:
- print errmsg
+except IOError as errmsg:
+ print(errmsg)
sys.exit(1)
regobj = re.compile('^(?!@)(?P<dirname>\S+)/.*')
-currdirs = filter(currplist, regobj)
+currdirs = list(filter(currplist, regobj))
regobj = re.compile('^@dirrm (?P<dirname>\S+).*$')
-currdirs.extend(filter(currplist, regobj))
+currdirs.extend(list(filter(currplist, regobj)))
currportdir = os.getcwd()
newcurrdirs = []