# HG changeset patch # User jhammel # Date 1351263887 0 # Node ID 427a94428f04f38ceb264ca7e3a7cd29a8f7d0c7 # Parent 31898fb3b7d99123960c9e7cde9d6817570337b5 have a different class for stable updates diff -r 31898fb3b7d9 -r 427a94428f04 dogdish/dispatcher.py --- a/dogdish/dispatcher.py Fri Oct 26 14:46:28 2012 +0000 +++ b/dogdish/dispatcher.py Fri Oct 26 15:04:47 2012 +0000 @@ -77,6 +77,10 @@ self._hash = hashlib.sha512(f.read()).hexdigest() return self._hash +class UpdateStable(Update): + prefix = 'b2g_stable_update_' + + ### request handlers class Handler(object): @@ -151,7 +155,8 @@ ### class level variables - defaults = {'directory': here} + defaults = {'directory': here, + 'update_class': Update} def __init__(self, **kw): @@ -190,14 +195,14 @@ """ # check for new updates - contents = Update.updates(self.directory) + contents = self.update_class.updates(self.directory) new = contents.difference(self.updates.keys()) if not new: # directory contents unchanged from cached values return False for update in new: - self.updates[update] = Update(self.directory, update) + self.updates[update] = self.update_class(self.directory, update) if self.current_update: if self.updates[update].stamp > self.current_update.stamp: self.current_update = self.updates[update]