backend/satellite_tools/satCerts.py | 14 --------------
backend/satellite_tools/satsync.py | 5 +++--
backend/satellite_tools/sync_handlers.py | 3 ---
backend/server/importlib/backend.py | 3 ---
4 files changed, 3 insertions(+), 22 deletions(-)
New commits:
commit e7ea66e7094179379071cd2cc22145c631fd1214
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 29 09:53:05 2011 +0200
removed dead exception
diff --git a/backend/satellite_tools/sync_handlers.py
b/backend/satellite_tools/sync_handlers.py
index d7dc709..32d5638 100644
--- a/backend/satellite_tools/sync_handlers.py
+++ b/backend/satellite_tools/sync_handlers.py
@@ -28,9 +28,6 @@ import syncLib
DEFAULT_ORG = 1
-class NoFreeEntitlementsError(Exception):
- "No free entitlements available to activate this satellite"
-
# Singleton-like
class BaseCollection:
_shared_state = {}
diff --git a/backend/server/importlib/backend.py b/backend/server/importlib/backend.py
index dc2a0b8..01f1c91 100644
--- a/backend/server/importlib/backend.py
+++ b/backend/server/importlib/backend.py
@@ -52,9 +52,6 @@ sequences = {
'rhnPackageChangeLogData' : 'rhn_pkg_cld_id_seq',
}
-class NoFreeEntitlementsError(Exception):
- "No free entitlements available to activate this satellite"
-
class Backend:
# This object is initialized by the specific subclasses (e.g.
# OracleBackend)
commit 442aff52e7d55b6cc2863c2275a9f9d05bdddb42
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Sep 27 14:04:43 2011 +0200
removed dead queries
diff --git a/backend/satellite_tools/satCerts.py b/backend/satellite_tools/satCerts.py
index ab22811..beb9523 100644
--- a/backend/satellite_tools/satCerts.py
+++ b/backend/satellite_tools/satCerts.py
@@ -301,14 +301,6 @@ def storeRhnCert(cert, check_generation=0, check_version=0):
rhnSQL.commit()
-_query_update_dates = rhnSQL.Statement("""
- UPDATE rhnSatelliteCert
- SET issued = :issued, expires = :expires
- WHERE label = :label
- AND ((version is null and :version is null)
- OR version = :version)
-""")
-
_query_latest_version = rhnSQL.Statement("""
SELECT COALESCE(version, 0) as version, version as orig_version, cert,
TO_CHAR(issued, 'YYYY-MM-DD HH24:MI:SS') as issued,
@@ -348,12 +340,6 @@ _query_update_web_user = rhnSQL.Statement("""
SET company = :owner
""")
-_query_update_rhnchannelfamily = rhnSQL.Statement("""
- UPDATE rhnchannelfamily
- SET name = :owner
- WHERE org_id = 1
-""")
-
#
# Monitoring Scout Config Push section
# Stuff needed to push scout configs after a successful sat-cert activation
commit e7fac130b843deadde44f724d9a4ecbf16221883
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Sep 14 11:00:05 2011 +0200
made syncCert() more readable
aka don't return from the middle
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index cfc57f6..3c252d3 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -518,6 +518,7 @@ class Syncer:
def syncCert(self):
"sync the RHN satellite cert if applicable (to local DB &
filesystem)"
+ store_cert = True
if self.mountpoint:
if self.rhn_cert:
# Certificate was presented on the command line
@@ -534,14 +535,14 @@ class Syncer:
raise RhnSyncException(_("No certificate found. "
"Please use --rhn-cert"))
cert = row['cert']
- return self._process_cert(cert, store_cert=0)
+ store_cert = False
else:
log2(1, 3, ["", _("RHN Entitlement Certificate sync")])
certSource = xmlWireSource.CertWireSource(self.systemid, self.sslYN,
self.xml_dump_version)
cert = string.strip(certSource.download())
- return self._process_cert(cert)
+ return self._process_cert(cert, store_cert)
def _process_cert(self, cert, store_cert=1):
"""Give the cert a check - if it's broken xml we'd better
find it out