1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Covert gnomedepends.py from Python 2 to Python 3.

No objections from:	sobomax
This commit is contained in:
Eitan Adler 2012-12-15 22:07:24 +00:00
parent 9183a5e528
commit c0efdaffe0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=308967

View File

@ -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 = []