summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to 'portato')
-rw-r--r--portato/backend/package.py2
-rw-r--r--portato/backend/portage/package.py8
-rw-r--r--portato/backend/portage/system.py6
-rw-r--r--portato/config_parser.py2
-rw-r--r--portato/gui/queue.py6
-rw-r--r--portato/gui/utils.py4
-rw-r--r--portato/gui/windows/main.py12
-rw-r--r--portato/odict.py2
-rw-r--r--portato/plistener.py4
-rw-r--r--portato/plugin.py2
10 files changed, 24 insertions, 24 deletions
diff --git a/portato/backend/package.py b/portato/backend/package.py
index f288bef..bcc209a 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -94,7 +94,7 @@ class Package (_Package):
f = f[1:]
removed = True
- invf = flags.invert_use_flag(f)
+ invf = flags.invert_use_flag(f)
if f[0] == '-':
if invf in i_flags and not (removed and invf in m_flags):
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index 0270029..250b491 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -156,7 +156,7 @@ class PortagePackage (Package):
else:
return reason
- def get_iuse_flags (self, installed = False, removeForced = True):
+ def get_iuse_flags (self, installed = False, removeForced = True):
if not self.is_in_system():
installed = True
@@ -185,7 +185,7 @@ class PortagePackage (Package):
deps = portage.dep_check(depstring, None, self._settings.settings, myuse = actual, trees = self._trees)
if not deps: # FIXME: what is the difference to [1, []] ?
- return []
+ return []
if deps[0] == 0: # error
raise DependencyCalcError, deps[1]
@@ -209,7 +209,7 @@ class PortagePackage (Package):
deps = portage.dep_check (depstring, self._settings.vartree.dbapi, self._settings.settings, myuse = actual, trees = self._trees)
if not deps: # FIXME: what is the difference to [1, []] ?
- return []
+ return []
if deps[0] == 0: # error
raise DependencyCalcError, deps[1]
@@ -311,4 +311,4 @@ class PortagePackage (Package):
return portage.pkgcmp(v1[1:],v2[1:])
def matches (self, criterion):
- return system.cpv_matches(self.get_cpv(), criterion)
+ return system.cpv_matches(self.get_cpv(), criterion)
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index e81951e..1fd4782 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -297,7 +297,7 @@ class PortageSystem (SystemInterface):
if p.get_slot_cp() in checked:
return
- else:
+ else:
if (not p.is_installed()) and (not add_not_installed):
# don't add these packages to checked as we may see them again
# - and then we might have add_not_installed being True
@@ -310,7 +310,7 @@ class PortageSystem (SystemInterface):
if not p.is_installed():
oldList = self.find_packages(p.get_slot_cp(), self.SET_INSTALLED)
- if oldList:
+ if oldList:
old = oldList[0] # we should only have one package here - else it is a bug
else:
oldList = self.sort_package_list(self.find_packages(p.get_cp(), self.SET_INSTALLED))
@@ -356,7 +356,7 @@ class PortageSystem (SystemInterface):
if i not in raw_checked or raw_checked[i] == False:
raw_checked.update({i : state[1]})
bm = self.get_new_packages([i])
- if not bm:
+ if not bm:
warning(_("Bug? No best match could be found for '%(package)s'. Needed by: '%(cpv)s'."), {"package" : i, "cpv": p.get_cpv()})
else:
for pkg in bm:
diff --git a/portato/config_parser.py b/portato/config_parser.py
index 37a32bf..e0bb15d 100644
--- a/portato/config_parser.py
+++ b/portato/config_parser.py
@@ -252,7 +252,7 @@ class ConfigParser:
# look for an expression
match = EXPRESSION.search(line)
- if match:
+ if match:
val = match.group("value")
# find the boolean value
diff --git a/portato/gui/queue.py b/portato/gui/queue.py
index 610bc49..66d6054 100644
--- a/portato/gui/queue.py
+++ b/portato/gui/queue.py
@@ -144,7 +144,7 @@ class EmergeQueue:
pkg = self._get_pkg_from_cpv(cpv, unmask)
if not pkg.is_installed():
old = system.find_packages(pkg.get_slot_cp(), system.SET_INSTALLED)
- if old:
+ if old:
old = old[0] # assume we have only one there
cmp = pkg.compare_version(old)
if cmp > 0:
@@ -260,7 +260,7 @@ class EmergeQueue:
for block in self.blocks[type]:
for c in self.iters[type]:
if system.cpv_matches(c, block):
- blocked = ", ".join(self.blocks[type][block])
+ blocked = ", ".join(self.blocks[type][block])
warning("'%s' is blocked by: %s", c, blocked)
self.remove_with_children(self.iters[type][c], False)
raise BlockedException(c, blocked)
@@ -428,7 +428,7 @@ class EmergeQueue:
its = {}
for k in queue:
list += ["="+k]
- if self.tree:
+ if self.tree:
its.update({k : self.iters["install"][k]})
return list, its
diff --git a/portato/gui/utils.py b/portato/gui/utils.py
index 661af6b..8bf076e 100644
--- a/portato/gui/utils.py
+++ b/portato/gui/utils.py
@@ -25,7 +25,7 @@ import gtk
# some backend things
from ..backend import flags, system, set_system
-from ..helper import debug, info, set_log_level
+from ..helper import debug, info, set_log_level
from ..constants import APP, LOCALE_DIR
# parser
@@ -72,7 +72,7 @@ class Config (ConfigParser):
@see: L{flags.set_config()}"""
flagCfg = {
- "usefile": self.get("useFile"),
+ "usefile": self.get("useFile"),
"usePerVersion" : self.get_boolean("usePerVersion"),
"maskfile" : self.get("maskFile"),
"maskPerVersion" : self.get_boolean("maskPerVersion"),
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 562e603..8728d57 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -133,7 +133,7 @@ class PackageTable:
self.instantChange = instantChange
self.type = type
- if not self.queue or not self.doEmerge:
+ if not self.queue or not self.doEmerge:
self.emergeBtn.set_sensitive(False)
self.unmergeBtn.set_sensitive(False)
@@ -533,7 +533,7 @@ class PackageTable:
if not store[path][0]:
prefix = "-"
- pkg.set_use_flag(prefix+flag)
+ pkg.set_use_flag(prefix+flag)
if self.instantChange:
self._update_keywords(True, update = True)
@@ -551,7 +551,7 @@ class MainWindow (Window):
LOG_PAGE
) = range(3)
- def __init__ (self, splash = None):
+ def __init__ (self, splash = None):
"""
Build up window.
@@ -1199,9 +1199,9 @@ class MainWindow (Window):
self.tray.set_tooltip(title)
window_title_update(title)
- if title is None or not self.cfg.get_boolean("updateConsole", "GUI"):
+ if title is None or not self.cfg.get_boolean("updateConsole", "GUI"):
title = _("Console")
- else:
+ else:
title = ("%s (%s)") % (_("Console"), title)
tlength = int(self.cfg.get("titlelength", "GUI"))
@@ -1588,7 +1588,7 @@ class MainWindow (Window):
Show the list of updateble packages.
"""
- def __update():
+ def __update():
def cb_idle_show(packages):
"""
Callback opening the menu when the calculation is finished.
diff --git a/portato/odict.py b/portato/odict.py
index 2c8391d..1c12ce8 100644
--- a/portato/odict.py
+++ b/portato/odict.py
@@ -731,7 +731,7 @@ class OrderedDict(dict):
if new_key in self:
raise ValueError("New key already exists: %r" % new_key)
# rename sequence entry
- value = self[old_key]
+ value = self[old_key]
old_idx = self._sequence.index(old_key)
self._sequence[old_idx] = new_key
# rename internal dict entry
diff --git a/portato/plistener.py b/portato/plistener.py
index 6eb476e..f842758 100644
--- a/portato/plistener.py
+++ b/portato/plistener.py
@@ -109,9 +109,9 @@ class PListener (object):
self._mem.write("%4d%s" % (len(string), string))
self._sig.V()
finally:
- self._rw.V()
+ self._rw.V()
- def send_notify (self, base = "", descr = "", icon = "", urgency = None):
+ def send_notify (self, base = "", descr = "", icon = "", urgency = None):
if self._sig is None:
self.do_notify(base, descr, icon, urgency)
else:
diff --git a/portato/plugin.py b/portato/plugin.py
index 34004cb..fb2e8f4 100644
--- a/portato/plugin.py
+++ b/portato/plugin.py
@@ -484,7 +484,7 @@ class PluginQueue (object):
def _resolve_unresolved (self, before, after):
def resolve(hook, list, type, add):
- if not list:
+ if not list:
return
callList = getattr(self.hooks[hook], type)