"""Tweak the data_version attribute of a list or all lists to force an update. Sometimes a site applies a patch to Mailman which adds and then uses new list attributes, but because the patch might be against an older release, it may not cause version updating to be done on existing lists. If that happens, this script will force version updating to be done for the list(s) it is run against. Save as bin/fix_data_version.py Run via bin/withlist -r fix_data_version to do the list or bin/withlist -a -r fix_data_version to do all lists. """ def fix_data_version(mlist): if not mlist.Locked(): mlist.Lock() # Decrement the list's data_version and Save and Load the list to # force an update. mlist.data_version -= 1 mlist.Save() mlist.Load() mlist.Unlock()