aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2012-12-15 22:07:24 +0000
committerEitan Adler <eadler@FreeBSD.org>2012-12-15 22:07:24 +0000
commitc0efdaffe04194e480869163044975f96e793e3d (patch)
tree6e91976c4da5b07a9a928f40d2883f2b4c9b572d /Tools
parent9183a5e52848eb3861b7404edc8aabba6aa32173 (diff)
downloadports-c0efdaffe04194e480869163044975f96e793e3d.tar.gz
ports-c0efdaffe04194e480869163044975f96e793e3d.zip
Covert gnomedepends.py from Python 2 to Python 3.
No objections from: sobomax
Notes
Notes: svn path=/head/; revision=308967
Diffstat (limited to 'Tools')
-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 = []