Date: Sat, 15 Dec 2012 22:07:24 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r308967 - head/Tools/scripts Message-ID: <201212152207.qBFM7OBi046044@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Sat Dec 15 22:07:24 2012 New Revision: 308967 URL: http://svnweb.freebsd.org/changeset/ports/308967 Log: Covert gnomedepends.py from Python 2 to Python 3. No objections from: sobomax Modified: head/Tools/scripts/gnomedepends.py Modified: head/Tools/scripts/gnomedepends.py ============================================================================== --- head/Tools/scripts/gnomedepends.py Sat Dec 15 22:05:36 2012 (r308966) +++ head/Tools/scripts/gnomedepends.py Sat Dec 15 22:07:24 2012 (r308967) @@ -69,7 +69,7 @@ regobj = re.compile('^@dirrm (?P<dirname 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 = []
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212152207.qBFM7OBi046044>