diff options
| author | klm | 1998-04-12 04:34:01 +0000 |
|---|---|---|
| committer | klm | 1998-04-12 04:34:01 +0000 |
| commit | ce39ff322b94abd5764a4f266bf517ca0749296c (patch) | |
| tree | 014f711e5ae939dce35afcc3102e2987ee47556e | |
| parent | c4a3ecb1f17a386f87df460d96edefbe44161481 (diff) | |
| download | mailman-ce39ff322b94abd5764a4f266bf517ca0749296c.tar.gz mailman-ce39ff322b94abd5764a4f266bf517ca0749296c.tar.zst mailman-ce39ff322b94abd5764a4f266bf517ca0749296c.zip | |
| -rw-r--r-- | Mailman/MailList.py | 11 | ||||
| -rw-r--r-- | modules/maillist.py | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 135aede56..de30dd0e3 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -1,6 +1,6 @@ "The class representing a mailman maillist. Mixes in many feature classes." -__version__ = "$Revision: 436 $" +__version__ = "$Revision: 440 $" try: import mm_cfg @@ -98,6 +98,7 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, return matches[0] def InitVars(self, name='', admin='', crypted_password=''): + """Assign default values - some will be overriden by stored state.""" # Non-configurable list info self._internal_name = name self._lock_file = None @@ -477,7 +478,7 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, file.close() self._ready = 1 self.CheckValues() - self.CheckVersion() + self.CheckVersion(dict) def LogMsg(self, kind, msg, *args): """Append a message to the log file for messages of specified kind.""" @@ -490,11 +491,13 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, logf.write("%s\n" % (msg % args)) logf.flush() - def CheckVersion(self): + def CheckVersion(self, stored_state): + """Migrate prior version's state to new structure, if changed.""" if self.data_version == mm_cfg.VERSION: return else: - pass # This function is just here to ease upgrades in the future. + from versions import Update + Update(self, stored_state) self.data_version = mm_cfg.VERSION self.Save() diff --git a/modules/maillist.py b/modules/maillist.py index 135aede56..de30dd0e3 100644 --- a/modules/maillist.py +++ b/modules/maillist.py @@ -1,6 +1,6 @@ "The class representing a mailman maillist. Mixes in many feature classes." -__version__ = "$Revision: 436 $" +__version__ = "$Revision: 440 $" try: import mm_cfg @@ -98,6 +98,7 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, return matches[0] def InitVars(self, name='', admin='', crypted_password=''): + """Assign default values - some will be overriden by stored state.""" # Non-configurable list info self._internal_name = name self._lock_file = None @@ -477,7 +478,7 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, file.close() self._ready = 1 self.CheckValues() - self.CheckVersion() + self.CheckVersion(dict) def LogMsg(self, kind, msg, *args): """Append a message to the log file for messages of specified kind.""" @@ -490,11 +491,13 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, logf.write("%s\n" % (msg % args)) logf.flush() - def CheckVersion(self): + def CheckVersion(self, stored_state): + """Migrate prior version's state to new structure, if changed.""" if self.data_version == mm_cfg.VERSION: return else: - pass # This function is just here to ease upgrades in the future. + from versions import Update + Update(self, stored_state) self.data_version = mm_cfg.VERSION self.Save() |
