diff options
author | Priit Laes <plaes@plaes.org> | 2010-08-03 00:21:53 +0300 |
---|---|---|
committer | Priit Laes <plaes@plaes.org> | 2010-08-03 00:21:53 +0300 |
commit | c9ebadcdcfbffc75032e3d697da260cd932ed2ec (patch) | |
tree | bb01624b3f2024c4aaa80088a8f125d6d81e0367 /grumpy/models.py | |
parent | Fix typo: s/pcv/cpv (diff) | |
download | gsoc2010-grumpy-c9ebadcdcfbffc75032e3d697da260cd932ed2ec.tar.gz gsoc2010-grumpy-c9ebadcdcfbffc75032e3d697da260cd932ed2ec.tar.bz2 gsoc2010-grumpy-c9ebadcdcfbffc75032e3d697da260cd932ed2ec.zip |
Added Package.sync() method
Diffstat (limited to 'grumpy/models.py')
-rw-r--r-- | grumpy/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
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) |