[sabayon] Fixed bug in groupdialog.py with GroupsModel, and some unconverted exceptions
- From: Federico Mena Quintero <federico src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [sabayon] Fixed bug in groupdialog.py with GroupsModel, and some unconverted exceptions
- Date: Mon, 26 Oct 2009 20:49:49 +0000 (UTC)
commit 889144d95635d30467e1a589808f64c7d134a319
Author: Scott Balneaves <sbalneav ltsp org>
Date: Thu Sep 3 16:31:41 2009 -0500
Fixed bug in groupdialog.py with GroupsModel, and some unconverted exceptions
admin-tool/groupsdialog.py | 7 ++++---
lib/systemdb.py | 16 ++++++++--------
2 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/admin-tool/groupsdialog.py b/admin-tool/groupsdialog.py
index c0eb731..635b0a1 100644
--- a/admin-tool/groupsdialog.py
+++ b/admin-tool/groupsdialog.py
@@ -33,13 +33,14 @@ class GroupsModel (gtk.ListStore):
) = range (2)
def __init__ (self, db, profile):
- gtk.ListStore.__init__ (self, str, str, bool)
+ gtk.ListStore.__init__ (self, str, bool)
for group in db.get_groups ():
row = self.append ()
self.set (row,
self.COLUMN_GROUP, group,
- self.COLUMN_APPLY, profile == db.get_profile (group, False, True))
+ self.COLUMN_APPLY, profile == db.get_profile (group,
+ False, True))
class GroupsDialog:
def __init__ (self, profile, parent):
@@ -53,7 +54,7 @@ class GroupsDialog:
self.dialog.set_transient_for (parent)
self.dialog.set_default_response (gtk.RESPONSE_CLOSE)
self.dialog.set_icon_name ("sabayon")
- self.dialog.set_title (_("groups for profile %s")%profile)
+ self.dialog.set_title (_("Groups for profile %s")%profile)
self.close_button = self.xml.get_widget ("groups_close_button")
diff --git a/lib/systemdb.py b/lib/systemdb.py
index 9127008..75f8caa 100644
--- a/lib/systemdb.py
+++ b/lib/systemdb.py
@@ -55,7 +55,7 @@ def get_setting (node, setting, default = None, convert_to = str):
# Translators: You may move the "%(setting)s" and "%(np)s" items as you wish, but
# do not change the way they are written. The intended string is
# something like "invalid type for setting blah in /ldap/path/to/blah"
- raise UserDatabaseException(_("invalid type for setting %(setting)s in %(np)s") % { "setting": setting,
+ raise SystemDatabaseException(_("invalid type for setting %(setting)s in %(np)s") % { "setting": setting,
"np": np })
return default
@@ -217,13 +217,13 @@ class SystemDatabase(object):
multiple_result = get_setting (map_node, "multiple_result", "first")
if search_base == None:
- raise UserDatabaseException(_("No search base specified for %s"%map))
+ raise SystemDatabaseException(_("No search base specified for %s"%map))
if query_filter == None:
- raise UserDatabaseException(_("No query filter specified for %s"%map))
+ raise SystemDatabaseException(_("No query filter specified for %s"%map))
if result_attribute == None:
- raise UserDatabaseException(_("No result attribute specified for %s"%map))
+ raise SystemDatabaseException(_("No result attribute specified for %s"%map))
if scope == "sub":
scope = ldap.SCOPE_SUBTREE
@@ -232,7 +232,7 @@ class SystemDatabase(object):
elif scope == "one":
scope = ldap.SCOPE_ONELEVEL
else:
- raise UserDatabaseException(_("Scope must be one of sub, base and one"))
+ raise SystemDatabaseException(_("Scope must be one of sub, base and one"))
query_filter = expand_string (query_filter, replace)
search_base = expand_string (search_base, replace)
@@ -252,7 +252,7 @@ class SystemDatabase(object):
elif multiple_result == "random":
val = vals[random.randint(0, len(vals)-1)]
else:
- raise UserDatabaseException(_("multiple_result must be one of first and random"))
+ raise SystemDatabaseException(_("multiple_result must be one of first and random"))
l.unbind ()
@@ -343,7 +343,7 @@ class SystemDatabase(object):
except:
dprint("Failed to restore from %s.bak\n", filename)
- raise UserDatabaseException(
+ raise SystemDatabaseException(
_("Could not open %s for writing") % filename)
try:
f.write(self.doc.serialize("UTF-8", format=1))
@@ -356,7 +356,7 @@ class SystemDatabase(object):
except:
dprint("Failed to restore from %s.bak\n", filename)
- raise UserDatabaseException(
+ raise SystemDatabaseException(
_("Failed to save UserDatabase to %s") % filename)
self.modified = 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]