[devel at bb.net] Adding attribute to serialized objects
Maria Marcano
mariangemarcano at gmail.com
Tue Jan 26 09:04:13 UTC 2016
Hi,
Do you know how we should handle adding an attribute to serialized object.
We are doing some customizations and we would like to add content_type to
class HTMLLogFile(styles.Versioned, LogFile):
so we increased the
persistenceVersion = 2
and added the
def upgradeToVersion2(self):
self.content_type = ''
self.wasUpgraded = True
But we got an error if we want to run buildbot on a different branch that
uses persistenceVersion = 1
the exception is thrown from this library
twisted/persisted/styles.py:400 in versionUpgrade
assert persistVers <= currentVers, "Sorry, can't go backwards in time."
Do you know how this should be handled?, it looks like we are missing/not
handle something?
Thanks!
Maria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/devel/attachments/20160126/229a34ed/attachment.html>
More information about the devel
mailing list