[Collab-qa-commits] r908 - in udd/src: . udd

neronus-guest at alioth.debian.org neronus-guest at alioth.debian.org
Wed Jul 2 10:52:16 UTC 2008


Author: neronus-guest
Date: 2008-07-02 10:52:16 +0000 (Wed, 02 Jul 2008)
New Revision: 908

Added:
   udd/src/udd/src_and_pkg_gatherer.py
Removed:
   udd/src/srcs_and_pkgs.py
Modified:
   udd/src/test.yaml
   udd/src/udd/packages_gatherer.py
   udd/src/udd/sources_gatherer.py
Log:
Rewrote the sources and packages gatherer
Fixed a little bug concerning the output of unknown keys


Deleted: udd/src/srcs_and_pkgs.py
===================================================================
--- udd/src/srcs_and_pkgs.py	2008-07-02 01:32:31 UTC (rev 907)
+++ udd/src/srcs_and_pkgs.py	2008-07-02 10:52:16 UTC (rev 908)
@@ -1,6 +0,0 @@
-import sys
-import os
-
-if __name__ == '__main__':
-  if os.system("python sources_gatherer.py " + " ".join(sys.argv[1:])) == 0:
-    os.system("python packages_gatherer.py " + " ".join(sys.argv[1:]))

Modified: udd/src/test.yaml
===================================================================
--- udd/src/test.yaml	2008-07-02 01:32:31 UTC (rev 907)
+++ udd/src/test.yaml	2008-07-02 10:52:16 UTC (rev 908)
@@ -5,7 +5,7 @@
     packages: module udd.packages_gatherer
     setup: exec python db_manager.py
     delete: exec python db_manager.py
-    src-pkg: exec python srcs_and_pkgs.py
+    src-pkg: module udd.src_and_pkg_gatherer
     popcon: module udd.popcon_gatherer
     #src-pkg: python sources_gatherer.py
   debug: 1

Modified: udd/src/udd/packages_gatherer.py
===================================================================
--- udd/src/udd/packages_gatherer.py	2008-07-02 01:32:31 UTC (rev 907)
+++ udd/src/udd/packages_gatherer.py	2008-07-02 10:52:16 UTC (rev 908)
@@ -1,5 +1,5 @@
 #/usr/bin/env python
-# Last-Modified: <Sun Jun 29 11:34:11 2008>
+# Last-Modified: <Sun Jun 29 11:49:49 2008>
 
 import debian_bundle.deb822
 import gzip
@@ -179,6 +179,8 @@
 
     self.connection.commit()
 
+    self.print_warnings()
+
   def print_warnings(self):
     for key in packages_gatherer.warned_about:
       print("Unknown key: %s appeared %d times" % (key, packages_gatherer.warned_about[key]))

Modified: udd/src/udd/sources_gatherer.py
===================================================================
--- udd/src/udd/sources_gatherer.py	2008-07-02 01:32:31 UTC (rev 907)
+++ udd/src/udd/sources_gatherer.py	2008-07-02 10:52:16 UTC (rev 908)
@@ -1,5 +1,5 @@
 #/usr/bin/env python
-# Last-Modified: <Sun Jun 29 11:28:15 2008>
+# Last-Modified: <Sun Jun 29 12:12:27 2008>
 
 import debian_bundle.deb822
 import gzip
@@ -129,6 +129,8 @@
       except IOError, (e, message):
 	print "Could not read packages from %s: %s" % (path, message)
 
+    self.print_warnings()
+
   def print_warnings(self):
-    for key in warned_about:
-      print "Unknowen key %s appeared %d times" % (key, warned_about[key])
+    for key in sources_gatherer.warned_about:
+      print "Unknowen key %s appeared %d times" % (key, sources_gatherer.warned_about[key])

Added: udd/src/udd/src_and_pkg_gatherer.py
===================================================================
--- udd/src/udd/src_and_pkg_gatherer.py	                        (rev 0)
+++ udd/src/udd/src_and_pkg_gatherer.py	2008-07-02 10:52:16 UTC (rev 908)
@@ -0,0 +1,17 @@
+import gatherer
+import sources_gatherer
+import packages_gatherer
+
+
+def get_gatherer(connection, config):
+  return src_and_pkg_gatherer(connection, config)
+
+class src_and_pkg_gatherer(gatherer.gatherer):
+  def __init__(self, connection, config):
+    gatherer.gatherer.__init__(self, connection, config)
+    self.src = sources_gatherer.sources_gatherer(connection, config)
+    self.pkg = packages_gatherer.packages_gatherer(connection, config)
+
+  def run(self, source):
+    self.src.run(source)
+    self.pkg.run(source)




More information about the Collab-qa-commits mailing list