aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-01-22 20:38:57 -0500
committerW. Trevor King <wking@drexel.edu>2010-01-22 20:38:57 -0500
commit331a641325daf3b067ecde2a51b5308c9287444e (patch)
tree99a7f1a42a22abd41e27853287771baade096212
parent4d925a688394b7840ec81165bbf2cdd43536f01b (diff)
downloadbugseverywhere-331a641325daf3b067ecde2a51b5308c9287444e.tar.gz
Move BugDir, Bug, and Comment to new _setup_saved_settings
-rw-r--r--libbe/bug.py6
-rw-r--r--libbe/bugdir.py4
-rw-r--r--libbe/comment.py6
3 files changed, 8 insertions, 8 deletions
diff --git a/libbe/bug.py b/libbe/bug.py
index 275a826..0b40921 100644
--- a/libbe/bug.py
+++ b/libbe/bug.py
@@ -121,7 +121,7 @@ def load_status(active_status_def, inactive_status_def):
load_status(active_status_def, inactive_status_def)
-class Bug(settings_object.SavedSettingsObject):
+class Bug (settings_object.SavedSettingsObject):
"""
>>> b = Bug()
>>> print b.status
@@ -628,11 +628,11 @@ class Bug(settings_object.SavedSettingsObject):
settings_mapfile = \
self.storage.get(self.id.storage('values'), default='\n')
try:
- self.settings = mapfile.parse(settings_mapfile)
+ settings = mapfile.parse(settings_mapfile)
except mapfile.InvalidMapfileContents, e:
raise Exception('Invalid settings file for bug %s\n'
'(BE version missmatch?)' % self.id.user())
- self._setup_saved_settings()
+ self._setup_saved_settings(settings)
def save_settings(self):
mf = mapfile.generate(self._get_saved_settings())
diff --git a/libbe/bugdir.py b/libbe/bugdir.py
index 30c9ef3..dd467bf 100644
--- a/libbe/bugdir.py
+++ b/libbe/bugdir.py
@@ -191,11 +191,11 @@ class BugDir (list, settings_object.SavedSettingsObject):
settings_mapfile = \
self.storage.get(self.id.storage('settings'), default='\n')
try:
- self.settings = mapfile.parse(settings_mapfile)
+ settings = mapfile.parse(settings_mapfile)
except mapfile.InvalidMapfileContents, e:
raise Exception('Invalid settings file for bugdir %s\n'
'(BE version missmatch?)' % self.id.user())
- self._setup_saved_settings()
+ self._setup_saved_settings(settings)
self._setup_severities(self.severities)
self._setup_status(self.active_status, self.inactive_status)
diff --git a/libbe/comment.py b/libbe/comment.py
index f1b979e..accd4df 100644
--- a/libbe/comment.py
+++ b/libbe/comment.py
@@ -93,7 +93,7 @@ def save_comments(bug):
comment.save()
-class Comment(Tree, settings_object.SavedSettingsObject):
+class Comment (Tree, settings_object.SavedSettingsObject):
"""
>>> c = Comment()
>>> c.uuid != None
@@ -587,11 +587,11 @@ class Comment(Tree, settings_object.SavedSettingsObject):
settings_mapfile = \
self.storage.get(self.id.storage("values"), default="\n")
try:
- self.settings = mapfile.parse(settings_mapfile)
+ settings = mapfile.parse(settings_mapfile)
except mapfile.InvalidMapfileContents, e:
raise Exception('Invalid settings file for comment %s\n'
'(BE version missmatch?)' % self.id.user())
- self._setup_saved_settings()
+ self._setup_saved_settings(settings)
def save_settings(self):
mf = mapfile.generate(self._get_saved_settings())