aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPriit Laes <plaes@plaes.org>2010-08-10 19:10:22 +0300
committerPriit Laes <plaes@plaes.org>2010-08-10 19:10:22 +0300
commit62a084cd933cbbf613d30e3822ad0698f541bb86 (patch)
tree9acb0b5b28f27630a1abe4fdf7487056b3b79fb0
parentDo not show empty table when user has no favorites (diff)
downloadgsoc2010-grumpy-62a084cd933cbbf613d30e3822ad0698f541bb86.tar.gz
gsoc2010-grumpy-62a084cd933cbbf613d30e3822ad0698f541bb86.tar.bz2
gsoc2010-grumpy-62a084cd933cbbf613d30e3822ad0698f541bb86.zip
Fix corner case in syncer
-rwxr-xr-xutils/grumpy_sync.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/grumpy_sync.py b/utils/grumpy_sync.py
index 813b6bc..7457bda 100755
--- a/utils/grumpy_sync.py
+++ b/utils/grumpy_sync.py
@@ -105,6 +105,10 @@ def main(path):
def package_sync(cat, pkg, files, mtime):
"""Update package information in database."""
+ # Bail out early if package has no ebuilds
+ if len(files) == 0:
+ return
+
# Fetch package from database
p = Package.query.filter_by(category=cat,pkg=pkg).first()