[Pkg-debile-commits] [debile-master] 80/126: fixing other stuff

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:56:19 UTC 2013


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch scan-build-html
in repository debile-master.

commit 4e2b41a101de9913e85297d1f413398c82869711
Author: Paul Tagliamonte <tag at pault.ag>
Date:   Mon Jun 10 22:21:34 2013 -0400

    fixing other stuff
---
 eg/config.json          |   19 -------------------
 lucy/models/__init__.py |   11 ++++++++++-
 lucy/models/job.py      |    3 +--
 3 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/eg/config.json b/eg/config.json
index de51f31..6cae59d 100644
--- a/eg/config.json
+++ b/eg/config.json
@@ -14,10 +14,6 @@
                     "lintian4py"
                 ],
                 "source": [
-                    "desktop-file-validate",
-                    "perlcritic",
-                    "cppcheck",
-                    "pep8",
                     "lintian",
                     "lintian4py"
                 ]
@@ -30,21 +26,6 @@
                 "testing",
                 "stable"
             ]
-        },
-        {
-            "_id": "auto-rebuild",
-            "job_classes": {
-                "binary": [
-                    "piuparts",
-                    "adequate",
-                    "lintian",
-                    "lintian4py"
-                ],
-                "source": [
-                    "lintian",
-                    "lintian4py"
-                ]
-            }
         }
     ],
     "machines": [
diff --git a/lucy/models/__init__.py b/lucy/models/__init__.py
index d36a0d0..22dbfac 100644
--- a/lucy/models/__init__.py
+++ b/lucy/models/__init__.py
@@ -44,7 +44,9 @@ class LucyObject(dict):
         return cls.from_dict(obj)
 
     @classmethod
-    def query(cls, what, sort=None, sort_order=1, limit=None):
+    def query(cls, what, sort=None, sort_order=1,
+              limit=None, page_count=None, page=0):
+
         table = _get_table(cls._type)
         pointer = table.find(what)
         if sort:
@@ -53,6 +55,13 @@ class LucyObject(dict):
         if limit:
             pointer = pointer.limit(limit)
 
+        if page and page_count:
+            offset = int(page) * int(page_count)
+            pointer = pointer.skip(offset)
+
+        if page_count:
+            pointer = pointer.limit(page_count)
+
         for x in pointer:
             yield cls(**x)
 
diff --git a/lucy/models/job.py b/lucy/models/job.py
index 7493ec0..13e43bf 100644
--- a/lucy/models/job.py
+++ b/lucy/models/job.py
@@ -133,8 +133,7 @@ class Job(LucyObject):
 
     @classmethod
     def by_source(cls, source, **kwargs):
-        for x in cls.query({"source": source}):
-            yield x
+        return cls.query({"source": source})
 
     @classmethod
     def unfinished_jobs(cls, **kwargs):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git



More information about the Pkg-debile-commits mailing list