[Collab-qa-commits] r931 - udd/src/udd
neronus-guest at alioth.debian.org
neronus-guest at alioth.debian.org
Thu Jul 24 20:23:07 UTC 2008
Author: neronus-guest
Date: 2008-07-24 20:23:06 +0000 (Thu, 24 Jul 2008)
New Revision: 931
Modified:
udd/src/udd/aux.py
Log:
Deleted some now redundant functions/methods
Modified: udd/src/udd/aux.py
===================================================================
--- udd/src/udd/aux.py 2008-07-24 19:52:26 UTC (rev 930)
+++ udd/src/udd/aux.py 2008-07-24 20:23:06 UTC (rev 931)
@@ -18,28 +18,6 @@
else:
return 'NULL'
-def get_archs(conn):
- """Return a dicitionary, mapping from architecture names to their ids.
-
- This mapping is retrivied from the connection <conn>"""
- cur = conn.cursor()
- cur.execute("SELECT * from arch_ids")
- result = {}
- for row in cur.fetchall():
- result[row[1]] = row[0]
- return result
-
-def get_distrs(conn):
- """Return a dicitionary, mapping from distribution names to their ids.
-
- This mapping is retrivied from the connection <conn>"""
- cur = conn.cursor()
- cur.execute("SELECT * from distr_ids")
- result = {}
- for row in cur.fetchall():
- result[row[1]] = row[0]
- return result
-
class ConfigException(Exception):
def __init__(self, message):
Exception(self)
@@ -85,28 +63,8 @@
return config
-def insert_distr(conn, distr_name):
- "Insert distribution <distr_name> into DB"
- cur = conn.cursor()
- cur.execute("INSERT INTO distr_ids (name) VALUES ('%s')" % distr_name)
-
def print_debug(*args):
"Print arguments to stdout if debug is set to something that evaluates to true"
if debug:
sys.stdout.write(*args)
sys.stdout.write("\n")
-
-class BufferedLineReader:
- """Provides an iterator over the input of the specified file."""
- def __init__(self, file, cache_size):
- self.cache_size = cache_size
- self.file = file
-
- def __iter__(self):
- while True:
- lines = self.file.readlines(self.cache_size)
- if len(lines) == 0:
- break
- for line in lines:
- yield line
-
More information about the Collab-qa-commits
mailing list