backend/server/rhnCapability.py | 22 --------------------
backend/server/test/unit-test/test_capabilities.py | 7 ------
client/tools/rhnpush/solaris2mpm.py | 23 ---------------------
client/tools/rhnpush/uploadLib.py | 3 --
4 files changed, 55 deletions(-)
New commits:
commit ece5c1865d498c05ef878f53bdc12ce15d0e00c2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Nov 28 11:29:11 2011 +0100
removed dead function
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 15c255b..0ac6d4a 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -645,9 +645,6 @@ def call(function, *params):
return ret
-def raw_call(function, *params):
- return function(*params)
-
def parseXMLRPCfault(fault):
if not isinstance(fault, xmlrpclib.Fault):
commit 8fcf1d3c6311d32e05b517f8f5a650140272e6b0
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Nov 28 11:29:11 2011 +0100
removed dead function
diff --git a/backend/server/rhnCapability.py b/backend/server/rhnCapability.py
index 5ac0fc6..134477c 100644
--- a/backend/server/rhnCapability.py
+++ b/backend/server/rhnCapability.py
@@ -54,28 +54,6 @@ def set_client_capabilities(capabilities):
def get_client_capabilities():
return rhnFlags.get('client-capabilities')
-def get_db_client_capabilities(server_id):
- h = rhnSQL.prepare("""
- select cc.capability_name_id, ccn.name capability, cc.version
- from rhnClientCapability cc, rhnClientCapabilityName ccn
- where cc.server_id = :server_id
- and cc.capability_name_id = ccn.id
- """)
- h.execute(server_id=server_id)
- ret = {}
- while 1:
- row = h.fetchone_dict()
- if not row:
- break
- name = row['capability']
- version = row['version']
- value = None
- ret[name] = {
- 'version' : version,
- 'value' : value,
- }
- return ret
-
def update_client_capabilities(server_id):
caps = get_client_capabilities()
diff --git a/backend/server/test/unit-test/test_capabilities.py
b/backend/server/test/unit-test/test_capabilities.py
index 02ab8eb..c2ee8af 100644
--- a/backend/server/test/unit-test/test_capabilities.py
+++ b/backend/server/test/unit-test/test_capabilities.py
@@ -89,13 +89,6 @@ def main():
server_id = sobj.getid()
print "Registered server", server_id
- caps = rhnCapability.get_db_client_capabilities(server_id)
- caps_len = len(caps.keys())
- expected_len = len(str_caps)
- if caps_len != expected_len:
- print "FAILED: return %d caps, expected %d" % (caps_len, expected_len)
- return 1
- print "Succeeded", caps
return 0
if __name__ == '__main__':
commit e935bd26fdce1c86579bb438ae7f01bff626d9b7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Nov 28 14:17:55 2011 +0100
removed dead function
diff --git a/client/tools/rhnpush/solaris2mpm.py b/client/tools/rhnpush/solaris2mpm.py
index 97086ab..4212d9b 100644
--- a/client/tools/rhnpush/solaris2mpm.py
+++ b/client/tools/rhnpush/solaris2mpm.py
@@ -881,29 +881,6 @@ def _unique_list_of_dicts(list_):
return list_
-def unique_patches(dict1, dict2, key):
- """traverse lists of patches in 2 dictionaries, and remove and
duplicates
- from the list in dict2"""
- # NOTE this is something of a kludge, and a bug that came up after the main
- # implementation because a patch can patch multiple packages and each
- # pkginfo file for each package can list the same requires, conflicts,
- # obsoletes patches, potentially adding the same patch(es) to these lists
- # multiple times
-
- removals = []
-
- # simple mxn algorithm, these lists shouldn't be more than a couple of
- # elements in length
- for p1 in dict1[key]:
- for p2 in dict2[key]:
- if p1['name'] == p2['name'] and p1['version'] ==
p2['version']:
- removals.append(p2)
-
- for r in removals:
- dict2[key].remove(r)
-
- return dict2[key]
-
# write mpm files --------------------------------------------------------
def write_mpm(mpm):