mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Covert gnomedepends.py from Python 2 to Python 3.
No objections from: sobomax
This commit is contained in:
parent
9183a5e528
commit
c0efdaffe0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=308967
1 changed files with 5 additions and 5 deletions
|
@ -69,7 +69,7 @@ regobj = re.compile('^@dirrm (?P<dirname>\S+).*$')
|
||||||
for portdir in gnomeports:
|
for portdir in gnomeports:
|
||||||
try:
|
try:
|
||||||
lines = readfile(os.path.join(portdir, 'pkg-plist'))
|
lines = readfile(os.path.join(portdir, 'pkg-plist'))
|
||||||
lines = filter(lines, regobj)
|
lines = list(filter(lines, regobj))
|
||||||
if len(lines) > 0:
|
if len(lines) > 0:
|
||||||
newgnomeports.append([portdir, lines])
|
newgnomeports.append([portdir, lines])
|
||||||
except IOError:
|
except IOError:
|
||||||
|
@ -79,14 +79,14 @@ newgnomeports = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
currplist = readfile('pkg-plist')
|
currplist = readfile('pkg-plist')
|
||||||
except IOError, errmsg:
|
except IOError as errmsg:
|
||||||
print errmsg
|
print(errmsg)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
regobj = re.compile('^(?!@)(?P<dirname>\S+)/.*')
|
regobj = re.compile('^(?!@)(?P<dirname>\S+)/.*')
|
||||||
currdirs = filter(currplist, regobj)
|
currdirs = list(filter(currplist, regobj))
|
||||||
regobj = re.compile('^@dirrm (?P<dirname>\S+).*$')
|
regobj = re.compile('^@dirrm (?P<dirname>\S+).*$')
|
||||||
currdirs.extend(filter(currplist, regobj))
|
currdirs.extend(list(filter(currplist, regobj)))
|
||||||
currportdir = os.getcwd()
|
currportdir = os.getcwd()
|
||||||
|
|
||||||
newcurrdirs = []
|
newcurrdirs = []
|
||||||
|
|
Loading…
Add table
Reference in a new issue