summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i18n/fr.po126
-rw-r--r--portato/__init__.py2
-rw-r--r--portato/backend/__init__.py6
-rw-r--r--portato/backend/flags.py77
-rw-r--r--portato/backend/package.py18
-rw-r--r--portato/backend/portage/__init__.py2
-rw-r--r--portato/backend/portage/package.py12
-rw-r--r--portato/backend/portage/package_22.py2
-rw-r--r--portato/backend/portage/sets.py8
-rw-r--r--portato/backend/portage/settings.py2
-rw-r--r--portato/backend/portage/settings_22.py2
-rw-r--r--portato/backend/portage/system.py37
-rw-r--r--portato/backend/portage/system_22.py4
-rw-r--r--portato/config_parser.py20
-rw-r--r--portato/db/__init__.py4
-rw-r--r--portato/db/database.py4
-rw-r--r--portato/db/eix_sql.py2
-rw-r--r--portato/db/hash.py8
-rw-r--r--portato/db/sql.py4
-rw-r--r--portato/dependency.py6
-rw-r--r--portato/eix/__init__.py1
-rw-r--r--portato/eix/exceptions.py2
-rw-r--r--portato/gui/__init__.py4
-rw-r--r--portato/gui/exception_handling.py6
-rw-r--r--portato/gui/queue.py14
-rw-r--r--portato/gui/slots.py2
-rw-r--r--portato/gui/updater.py4
-rw-r--r--portato/gui/utils.py4
-rw-r--r--portato/gui/views.py4
-rw-r--r--portato/gui/windows/about.py2
-rw-r--r--portato/gui/windows/basic.py2
-rw-r--r--portato/gui/windows/mailinfo.py10
-rw-r--r--portato/gui/windows/main.py45
-rw-r--r--portato/gui/windows/pkglist.py6
-rw-r--r--portato/gui/windows/plugin.py12
-rw-r--r--portato/gui/windows/preference.py14
-rw-r--r--portato/gui/windows/search.py2
-rw-r--r--portato/gui/windows/splash.py2
-rw-r--r--portato/helper.py6
-rw-r--r--portato/listener.py4
-rw-r--r--portato/log.py4
-rw-r--r--portato/plugin.py26
-rw-r--r--portato/session.py16
-rw-r--r--portato/su.py2
-rw-r--r--portato/waiting_queue.py4
45 files changed, 255 insertions, 289 deletions
diff --git a/i18n/fr.po b/i18n/fr.po
index 02dd3a0..48738a4 100644
--- a/i18n/fr.po
+++ b/i18n/fr.po
@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Portato\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-04-22 00:29+0200\n"
-"PO-Revision-Date: 2010-04-22 16:50+0100\n"
+"POT-Creation-Date: 2010-05-12 00:25+0200\n"
+"PO-Revision-Date: 2010-05-12 00:26+0100\n"
"Last-Translator: Clément Bourgeois <moonpyk@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -168,8 +168,8 @@ msgid "Queue"
msgstr "File d'attente"
#: portato/gui/templates/MainWindow.ui:806
-#: portato/gui/windows/main.py:1262
-#: portato/gui/windows/main.py:1264
+#: portato/gui/windows/main.py:1263
+#: portato/gui/windows/main.py:1265
msgid "Console"
msgstr "Console"
@@ -571,43 +571,43 @@ msgstr "Tous les suivants"
msgid "Can't display dependencies: This package has an unsupported dependency string."
msgstr "Impossible d'afficher les dépendances : ce paquetage comporte une chaîne de dépendance non supportée."
-#: portato/plugin.py:446
-#: portato/plugin.py:449
-#: portato/plugin.py:459
+#: portato/plugin.py:444
+#: portato/plugin.py:447
+#: portato/plugin.py:457
#, python-format
msgid "Loading plugin '%(plugin)s' failed: %(error)s"
msgstr "Enregistrement du greffon '%(plugin)s' échoué : %(error)s"
-#: portato/plugin.py:462
+#: portato/plugin.py:460
#, python-format
msgid "Loading widgets of plugin '%(plugin)s' failed: %(error)s"
msgstr "Chargement des widgets du greffon '%(plugin)s' impossible : %(error)s"
-#: portato/plugin.py:497
+#: portato/plugin.py:495
msgid "Plugin is disabled!"
msgstr "Le greffon est désactivé !"
-#: portato/plugin.py:499
+#: portato/plugin.py:497
msgid "Plugin has unresolved dependencies - disabled!"
msgstr "Le greffon a des dépendances non résolues - désactivé !"
-#: portato/plugin.py:503
+#: portato/plugin.py:501
#, python-format
msgid "Plugin '%s' loaded."
msgstr "Greffon '%s' chargé."
-#: portato/plugin.py:601
+#: portato/plugin.py:599
#, python-format
msgid "For hook '%(hook)s' an override is already defined by plugin '%(plugin)s'!"
msgstr "Une surcharge est déjà définie pour le hook '%(hook)s' par le greffon '%(plugin)s'!"
-#: portato/plugin.py:602
+#: portato/plugin.py:600
#, python-format
msgid "It is now replaced by the one from plugin '%s'!"
msgstr "Il est maintenant remplacé par celui du greffon '%s' !"
-#: portato/plugin.py:704
-#: portato/plugin.py:707
+#: portato/plugin.py:702
+#: portato/plugin.py:705
#, python-format
msgid "Registrating plugin '%(plugin)s' failed: %(error)s"
msgstr "Enregistrement du greffon '%(plugin)s' échoué : %(error)s"
@@ -626,7 +626,7 @@ msgstr "Fin de fichier atteinte de façon inattendue : '%s'"
msgid "Version '%s' is not supported."
msgstr "La version '%s' n'est pas supportée."
-#: portato/config_parser.py:266
+#: portato/config_parser.py:268
#, python-format
msgid "Unrecognized line in configuration: %s"
msgstr "Ligne non reconnue dans la configuration : %s"
@@ -684,45 +684,45 @@ msgstr "Envoyer..."
msgid "Save traceback..."
msgstr "Sauvegarder la trace..."
-#: portato/gui/utils.py:189
+#: portato/gui/utils.py:187
msgid "oneshot"
msgstr "oneshot"
-#: portato/gui/utils.py:194
+#: portato/gui/utils.py:192
#, python-format
msgid "updating from version %s"
msgstr "mise-à-jour depuis la version %s."
-#: portato/gui/utils.py:196
+#: portato/gui/utils.py:194
msgid "updating"
msgstr "mise à jour"
-#: portato/gui/utils.py:201
+#: portato/gui/utils.py:199
#, python-format
msgid "downgrading from version %s"
msgstr "rétrogradation depuis la version %s"
-#: portato/gui/utils.py:203
+#: portato/gui/utils.py:201
msgid "downgrading"
msgstr "rétrogradation"
-#: portato/gui/utils.py:207
+#: portato/gui/utils.py:205
msgid "IUSE changes:"
msgstr "Changements IUSE :"
-#: portato/gui/utils.py:225
+#: portato/gui/utils.py:223
msgid "(In Progress)"
msgstr "(En cours)"
-#: portato/gui/utils.py:250
+#: portato/gui/utils.py:248
msgid "Install"
msgstr "Installer"
-#: portato/gui/utils.py:261
+#: portato/gui/utils.py:259
msgid "Uninstall"
msgstr "Désinstaller"
-#: portato/gui/utils.py:273
+#: portato/gui/utils.py:271
msgid "Update"
msgstr "Mettre à jour"
@@ -883,7 +883,7 @@ msgstr ""
"Veuillez exécuter <i>emerge --sync &amp;&amp; layman -S</i>."
#: portato/gui/dialogs.py:141
-#: portato/gui/windows/main.py:1311
+#: portato/gui/windows/main.py:1312
#, python-format
msgid "No versions of package '%s' found!"
msgstr "Aucune version du paquetage '%s' trouvée !"
@@ -1043,23 +1043,23 @@ msgstr "Traduction de la session de la version %d vers %d."
msgid "Cannot translate session from version %d to %d."
msgstr "Impossible de traduire la session de la version %d vers %d."
-#: portato/gui/windows/main.py:1447
+#: portato/gui/windows/main.py:1448
msgid "use flags"
msgstr "flags use"
-#: portato/gui/windows/main.py:1459
+#: portato/gui/windows/main.py:1460
msgid "masking keywords"
msgstr "keywords masquants"
-#: portato/gui/windows/main.py:1868
+#: portato/gui/windows/main.py:1869
msgid "The portage tree is not existing."
msgstr "L'arbre portage n'existe pas."
-#: portato/gui/windows/main.py:1872
+#: portato/gui/windows/main.py:1873
msgid "The portage tree seems to be empty."
msgstr "L'arbre portage semble être vide."
-#: portato/gui/windows/main.py:1875
+#: portato/gui/windows/main.py:1876
msgid "The sqlite cache backend of portage is not supported at the moment. See https://bugs.launchpad.net/portato/+bug/564292."
msgstr "Le backend de cache sqlite pour portage n'est plus supporté pour le moment. Referez vous à : https://bugs.launchpad.net/portato/+bug/564292."
@@ -1081,11 +1081,11 @@ msgstr "KeyError détectée => %s ne semble pas être une catégorie disponible.
msgid "Error while compiling search expression: '%s'."
msgstr "Erreur pendant la compilation de l'expression de recherche : '%s'."
-#: portato/db/sql.py:82
+#: portato/db/sql.py:80
msgid "Cleaning database..."
msgstr "Nettoyage de la base de données..."
-#: portato/db/sql.py:84
+#: portato/db/sql.py:82
msgid "Populating database..."
msgstr "Remplissage de la base de données..."
@@ -1094,11 +1094,11 @@ msgstr "Remplissage de la base de données..."
msgid "Cache file '%s' does not exist. Using default instead."
msgstr "Le fichier de cache '%s' n'existe pas. Utilisation du cache par défaut."
-#: portato/db/__init__.py:21
+#: portato/db/__init__.py:19
msgid "eix + SQLite"
msgstr "eix + SQLite"
-#: portato/db/__init__.py:21
+#: portato/db/__init__.py:19
msgid ""
"Similar to SQLite, but now uses the eix database to get the package information.\n"
"This should be much faster on startup, but requires that your eix database is always up-to-date.\n"
@@ -1108,11 +1108,11 @@ msgstr ""
"Ce mode est normalement plus rapide au démarrage, mais nécessite que votre base de données eix soit toujours à jour.\n"
"De plus, ce système est le seul à permettre de faire des recherches dans les descriptions des paquets."
-#: portato/db/__init__.py:22
+#: portato/db/__init__.py:20
msgid "SQLite"
msgstr "SQLite"
-#: portato/db/__init__.py:22
+#: portato/db/__init__.py:20
msgid ""
"Uses an SQLite-database to store package information.\n"
"May take longer to generate at the first time, but has advantages if portato is re-started with an unchanged portage tree. Additionally it allows to use fast SQL expressions for fetching the data."
@@ -1120,11 +1120,11 @@ msgstr ""
"Utilise une base de données SQLite pour enregistrer les informations sur les paquetages.\n"
"Ce système peut prendre plus de temps pour la première utilisation mais dispose d'avantages si portato est redémarré sans changements apportés à l'arbre portage. De plus, il permet l'utilisation d'expression SQL rapides pour récupérer les données."
-#: portato/db/__init__.py:23
+#: portato/db/__init__.py:21
msgid "Hashmap"
msgstr "Hashmap"
-#: portato/db/__init__.py:23
+#: portato/db/__init__.py:21
msgid ""
"Uses an in-memory hashmap to store package information.\n"
"Has been used since at least version 0.3.3, but all information has to be regenerated on each startup."
@@ -1132,18 +1132,18 @@ msgstr ""
"Utilise une table de hashage gardée en mémoire pour stocker les informations des paquetages.\n"
"Ce procédé existe depuis la version 0.3.3, mais la table doit être régénérée à chaque démarrage."
-#: portato/db/__init__.py:45
+#: portato/db/__init__.py:43
#, python-format
msgid "Using database type '%s'"
msgstr "Utilisation d'une base de données de type '%s'"
-#: portato/db/__init__.py:52
-#: portato/db/__init__.py:67
+#: portato/db/__init__.py:50
+#: portato/db/__init__.py:65
#, python-format
msgid "Cannot load %s."
msgstr "Impossible de charger %s."
-#: portato/db/__init__.py:73
+#: portato/db/__init__.py:71
#, python-format
msgid "Unknown database type: %s"
msgstr "Type de base de données inconnue : %s"
@@ -1162,59 +1162,45 @@ msgstr "Nom"
msgid "do not fork off as root"
msgstr "ne pas forker en tant que root"
-#: portato/__init__.py:83
+#: portato/__init__.py:57
+msgid "print the directory the plugins are located in"
+msgstr "affiche le dossier ou sont localisés les plugins"
+
+#: portato/__init__.py:91
msgid "Starting Portato"
msgstr "Démarrage de Portato"
-#: portato/__init__.py:125
+#: portato/__init__.py:133
msgid "No valid su command detected. Aborting."
msgstr "Aucune commande su valide détectée. Annulation."
-#: portato/backend/flags.py:527
+#: portato/backend/flags.py:525
#, python-format
msgid "Conflicting values for masking status: %s"
msgstr "Valeurs entrant en conflit pour le statuts de masquage : %s"
-#: portato/backend/flags.py:690
+#: portato/backend/flags.py:686
#, python-format
msgid "Line %(line)s in file %(file)s misses a keyword (e.g. '~x86')."
msgstr "La ligne %(line)s dans le fichier %(file)s n'a pas de keyword (par exemple '~x86')."
-#: portato/backend/portage/system.py:281
+#: portato/backend/portage/system.py:270
#, python-format
msgid "No best match for %s. It seems not to be in the tree anymore."
msgstr "Pas de meilleure correspondance pour %s trouvée. Il semble qu'elle n'existe plus dans l'arbre à présent."
-#: portato/backend/portage/system.py:339
+#: portato/backend/portage/system.py:328
#, python-format
msgid "Found a not installed dependency: %s."
msgstr "Dépendance non installée trouvée : %s."
-#: portato/backend/portage/system.py:381
+#: portato/backend/portage/system.py:370
#, python-format
msgid "Bug? No best match could be found for '%(package)s'. Needed by: '%(cpv)s'."
msgstr "Bogue ? Aucune meilleure solution trouvée pour '%(package)s', qui est nécessaire à : '%(cpv)s'."
-#: portato/backend/portage/package.py:129
+#: portato/backend/portage/package.py:127
#, python-format
msgid "BUG in flags.new_masking_status. It returns '%s'"
msgstr "Bogue dans flags.new_masking_status. Renvoie '%s'"
-#~ msgid "Widgets of plugin '%s' loaded."
-#~ msgstr "Widgets du greffon '%s' chargés."
-
-#~ msgid "Overriding hook '%(hook)s' with plugin '%(plugin)s'."
-#~ msgstr "Surcharge du hook '%(hook)s' avec le greffon '%(plugin)s'."
-
-#~ msgid ""
-#~ "Dependant '%(dep)s' for '%(hook)s' in plugin '%(plugin)s' not found! "
-#~ "Adding nevertheless."
-#~ msgstr ""
-#~ "Le dépendant '%(dep)s' pour le hook '%(hook)s' du greffon '%(plugin)s' "
-#~ "trouvé ! Ajouté quand même."
-
-#~ msgid "Portage"
-#~ msgstr "Portage"
-
-#~ msgid "Attach _Logfile"
-#~ msgstr "Attacher le fichier de _log"
diff --git a/portato/__init__.py b/portato/__init__.py
index 12b8fe4..b4ea214 100644
--- a/portato/__init__.py
+++ b/portato/__init__.py
@@ -10,7 +10,7 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from __future__ import absolute_import
+
import gettext, locale
import sys, os
diff --git a/portato/backend/__init__.py b/portato/backend/__init__.py
index 5f32818..5fb716e 100644
--- a/portato/backend/__init__.py
+++ b/portato/backend/__init__.py
@@ -10,7 +10,7 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from __future__ import absolute_import
+
from ..helper import debug
from .system_interface import SystemInterface
@@ -21,7 +21,7 @@ class _Package (object):
whether an object is a package. It cannot use the normal Package class as this results in cyclic dependencies."""
def __init__ (self):
- raise TypeError, "Calling __init__ on portato.backend._Package objects is not allowed."
+ raise TypeError("Calling __init__ on portato.backend._Package objects is not allowed.")
def is_package(what):
return isinstance(what, _Package)
@@ -65,6 +65,6 @@ class SystemWrapper (SystemInterface):
from .portage import PortageSystem
cls.__wrapped_sys = PortageSystem ()
else:
- raise InvalidSystemError, cls.__system
+ raise InvalidSystemError(cls.__system)
system = SystemWrapper()
diff --git a/portato/backend/flags.py b/portato/backend/flags.py
index 6c74024..27f7a11 100644
--- a/portato/backend/flags.py
+++ b/portato/backend/flags.py
@@ -10,8 +10,6 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from __future__ import absolute_import, with_statement
-
import os
import itertools as itt
from subprocess import Popen, PIPE # needed for grep
@@ -134,7 +132,7 @@ def set_config (cfg):
for i in CONFIG.keys():
if not i in cfg:
- raise KeyError, "Missing keyword in config: "+i
+ raise KeyError("Missing keyword in config: "+i)
for i in CONFIG:
CONFIG[i] = cfg[i]
@@ -589,31 +587,29 @@ def write_masked ():
list = system.split_cpv(cpv)
msg += "%s/%s\n" % (list[0],list[1])
if not file in file_cache:
- f = open(file, "a")
- f.write(msg)
- f.close()
+ with open(file, "a") as f:
+ f.write(msg)
else:
file_cache[file].append(msg)
# change a line
else:
if not file in file_cache:
# read file
- f = open(file, "r")
- lines = []
- i = 1
- while i < line: # stop at the given line
- lines.append(f.readline())
- i = i+1
- # delete
- l = f.readline()
- l = "#"+l[:-1]+" # removed by portato\n"
- lines.append(l)
+ with open(file, "r") as f:
+ lines = []
+ i = 1
+ while i < line: # stop at the given line
+ lines.append(f.readline())
+ i = i+1
+ # delete
+ l = f.readline()
+ l = "#"+l[:-1]+" # removed by portato\n"
+ lines.append(l)
- # read the rest
- lines.extend(f.readlines())
+ # read the rest
+ lines.extend(f.readlines())
- file_cache[file] = lines
- f.close()
+ file_cache[file] = lines
else: # in cache
l = file_cache[file][line-1]
# delete:
@@ -725,31 +721,29 @@ def write_testing ():
list = system.split_cpv(cpv)
msg += "%s/%s ~%s\n" % (list[0],list[1],arch)
if not file in file_cache:
- f = open(file, "a")
- f.write(msg)
- f.close()
+ with open(file, "a") as f:
+ f.write(msg)
else:
file_cache[file].append(msg)
# change a line
else:
if not file in file_cache:
# read file
- f = open(file, "r")
- lines = []
- i = 1
- while i < line: # stop at the given line
- lines.append(f.readline())
- i = i+1
- # delete
- l = f.readline()
- l = "#"+l[:-1]+" # removed by portato\n"
- lines.append(l)
-
- # read the rest
- lines.extend(f.readlines())
-
- file_cache[file] = lines
- f.close()
+ with open(file, "r") as f:
+ lines = []
+ i = 1
+ while i < line: # stop at the given line
+ lines.append(f.readline())
+ i = i+1
+ # delete
+ l = f.readline()
+ l = "#"+l[:-1]+" # removed by portato\n"
+ lines.append(l)
+
+ # read the rest
+ lines.extend(f.readlines())
+
+ file_cache[file] = lines
else: # in cache
l = file_cache[file][line-1]
# delete:
@@ -758,9 +752,8 @@ def write_testing ():
# write to disk
for file in file_cache.keys():
- f = open(file, "w")
- f.writelines(file_cache[file])
- f.close()
+ with open(file, "w") as f:
+ f.writelines(file_cache[file])
# reset
newTesting = {}
system.reload_settings()
diff --git a/portato/backend/package.py b/portato/backend/package.py
index 34cdbe4..7fddb21 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -10,7 +10,7 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from __future__ import absolute_import
+from future_builtins import map, filter, zip
from ..helper import debug, paren_reduce
from ..dependency import DependencyTree
@@ -27,6 +27,7 @@ class Package (_Package):
@type cpv: string (cat/pkg-ver)"""
self._cpv = cpv
+ self._slot = None
def __repr__ (self):
return "<Package '%s' @0x%x>" % (self._cpv, id(self))
@@ -154,15 +155,26 @@ class Package (_Package):
@returns: category/package.
@rtype: string"""
- return self.get_category()+"/"+self.get_name()
+ return "/".join((self.get_category(), self.get_name()))
+ def get_slot (self):
+ """Returns the slot.
+
+ @returns: Slot
+ @rtype: string"""
+
+ if self._slot is None:
+ self._slot = self.get_package_settings("SLOT")
+
+ return self._slot
+
def get_slot_cp (self):
"""Returns the current cp followed by a colon and the slot-number.
@returns: cp:slot
@rtype: string"""
- return ("%s:%s" % (self.get_cp(), self.get_package_settings("SLOT")))
+ return ":".join((self.get_cp(), self.get_slot()))
def get_package_path(self):
"""Returns the path to where the ChangeLog, Manifest, .ebuild files reside.
diff --git a/portato/backend/portage/__init__.py b/portato/backend/portage/__init__.py
index 11bdd89..3b0d18b 100644
--- a/portato/backend/portage/__init__.py
+++ b/portato/backend/portage/__init__.py
@@ -10,7 +10,7 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from __future__ import absolute_import
+from future_builtins import map, filter, zip
from ...helper import debug
from portage import VERSION as PV
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index b34e3ef..5f01cad 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -10,8 +10,6 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from __future__ import absolute_import, with_statement
-
from ..package import Package
from .. import flags
from .. import system
@@ -184,7 +182,7 @@ class PortagePackage (Package):
return []
if deps[0] == 0: # error
- raise DependencyCalcError, deps[1]
+ raise DependencyCalcError(deps[1])
deps = deps[1]
@@ -206,7 +204,7 @@ class PortagePackage (Package):
return []
if deps[0] == 0: # error
- raise DependencyCalcError, deps[1]
+ raise DependencyCalcError(deps[1])
deps = deps[1]
@@ -234,7 +232,7 @@ class PortagePackage (Package):
else:
dep_pkgs.append(dep)
elif blocked:
- raise BlockedException, (self.get_cpv(), blocked[0].get_cpv())
+ raise BlockedException((self.get_cpv(), blocked[0].get_cpv()))
continue # finished with the blocking one -> next
@@ -242,7 +240,7 @@ class PortagePackage (Package):
if not pkg: # try to find masked ones
pkgs = system.find_packages(dep, masked = True)
if not pkgs:
- raise PackageNotFoundException, dep
+ raise PackageNotFoundException(dep)
pkgs = system.sort_package_list(pkgs)
pkgs.reverse()
@@ -299,5 +297,5 @@ class PortagePackage (Package):
def matches (self, criterion):
# cpv_matches needs explicit slot info
- scpv = "%s:%s" % (self.get_cpv(), self.get_package_settings("SLOT"))
+ scpv = ":".join((self.get_cpv(), self.get_slot()))
return system.cpv_matches(scpv, criterion)
diff --git a/portato/backend/portage/package_22.py b/portato/backend/portage/package_22.py
index 23e8ed5..61d7364 100644
--- a/portato/backend/portage/package_22.py
+++ b/portato/backend/portage/package_22.py
@@ -10,7 +10,7 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from __future__ import absolute_import, with_statement
+
from .package import PortagePackage
diff --git a/portato/backend/portage/sets.py b/portato/backend/portage/sets.py
index 6c483c9..0e9bf2f 100644
--- a/portato/backend/portage/sets.py
+++ b/portato/backend/portage/sets.py
@@ -10,7 +10,7 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from __future__ import absolute_import, with_statement
+from future_builtins import map, filter, zip
import re
import itertools as itt
@@ -33,7 +33,7 @@ class Set(object):
try:
t = self.get_pkgs(key, is_regexp, masked, with_version, only_cpv)
# catch the "ambigous package" Exception
- except ValueError, e:
+ except ValueError as e:
if isinstance(e[0], list):
t = set()
for cp in e[0]:
@@ -55,7 +55,7 @@ class InstalledSet (Set):
t = system.settings.vartree.dbapi.cp_all()
if key:
- t = filter(lambda x: re.search(key, x, re.I), t)
+ t = [x for x in t if re.search(key, x, re.I)]
return t
@@ -82,7 +82,7 @@ class TreeSet (Set):
t = system.settings.porttree.dbapi.cp_all()
if key:
- t = filter(lambda x: re.search(key, x, re.I), t)
+ t = [x for x in t if re.search(key, x, re.I)]
return set(t)
diff --git a/portato/backend/portage/settings.py b/portato/backend/portage/settings.py
index 2f3b780..0c857ac 100644
--- a/