From c9ebadcdcfbffc75032e3d697da260cd932ed2ec Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Tue, 3 Aug 2010 00:21:53 +0300 Subject: Added Package.sync() method --- grumpy/models.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'grumpy/models.py') diff --git a/grumpy/models.py b/grumpy/models.py index a3b5772..6fc2d49 100644 --- a/grumpy/models.py +++ b/grumpy/models.py @@ -172,6 +172,10 @@ class Package(db.Model): def __repr__(self): return '<%s> - %s' % (self.__class__.__name__, self.key) + def sync(self, ebuild_src, mtime=time.time()): + """Update package values from ebuild_src.""" + self.__init__(ebuild_src, mtime) + # def rename(self, newcat, newpkg): # """Rename package and its ebuilds""" # cp = "%s/%s" % (newpkg, newcat) -- cgit v1.2.3-65-gdbad