From: <bni...@us...> - 2008-10-01 22:04:38
|
Revision: 1058 http://omc.svn.sourceforge.net/omc/?rev=1058&view=rev Author: bnicholes Date: 2008-10-01 22:04:31 +0000 (Wed, 01 Oct 2008) Log Message: ----------- Fix the subprocess imports for calling external utilities and also set the caption and description to at least the service name if no short name is found Modified Paths: -------------- pybase/trunk/OMC_InitdService.py Modified: pybase/trunk/OMC_InitdService.py =================================================================== --- pybase/trunk/OMC_InitdService.py 2008-10-01 14:19:39 UTC (rev 1057) +++ pybase/trunk/OMC_InitdService.py 2008-10-01 22:04:31 UTC (rev 1058) @@ -82,9 +82,9 @@ #------------------------------------------------------------------------------ def _get_rpm_install_date(fullpath): try: - l=subprocess.Popen([r'/bin/rpm', '-qf', '--queryformat', \ + l=Popen([r'/bin/rpm', '-qf', '--queryformat', \ '%{INSTALLTIME}', fullpath], \ - stdout=subprocess.PIPE).communicate()[0] + stdout=PIPE).communicate()[0] if len(l): return pywbem.CIMDateTime.fromtimestamp(long(l)) except: @@ -143,7 +143,7 @@ raise pywbem.CIMError(CIM_ERR_NOT_FOUND) fo = open(fullpath, 'r') - caption = None + caption = model['name'] for line in fo.xreadlines(): if line.startswith('#') and 'Short-Description:' in line: caption = line[line.find(':')+1:] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |