backend/satellite_tools/satComputePkgHeaders.py | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 2c0bb832d2c3441817b27f240d8ceeea32f08b6b
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Tue Sep 14 18:19:35 2010 +0200
initCFG('server') before initDB
This is to avoid following traceback:
Traceback (most recent call last):
File "/usr/share/rhn/satellite_tools/satComputePkgHeaders.py", line
230, in ?
sys.exit(Runner().main() or 0)
File "/usr/share/rhn/satellite_tools/satComputePkgHeaders.py", line
87, in main
rhnSQL.initDB(self.options.db)
File "/usr/share/rhn/server/rhnSQL/__init__.py", line 80, in initDB
backend=CFG.DB_BACKEND
File "/usr/share/rhn/common/rhnConfig.py", line 334, in __getattr__
self.__check()
File "/usr/share/rhn/common/rhnConfig.py", line 378, in __check
self.__component)
common.rhnConfig.ConfigParserError: ('Uninitialized config for
component', ())
diff --git a/backend/satellite_tools/satComputePkgHeaders.py
b/backend/satellite_tools/satComputePkgHeaders.py
index c8e0fc1..ff62444 100644
--- a/backend/satellite_tools/satComputePkgHeaders.py
+++ b/backend/satellite_tools/satComputePkgHeaders.py
@@ -24,6 +24,7 @@ _path = "/usr/share/rhn"
if _path not in sys.path:
sys.path.append(_path)
+from common import initCFG
SERVER_RETURN = 0
@@ -84,6 +85,7 @@ class Runner:
print "--db not specified"
return 1
+ initCFG('server')
rhnSQL.initDB(self.options.db)
self._channels_hash = self._get_channels()
Show replies by date