[Oval-commits] r307 - trunk/oval-server
Pavel Vinogradov
blaze-guest at alioth.debian.org
Sun Nov 18 19:43:29 UTC 2007
Author: blaze-guest
Date: 2007-11-18 19:43:29 +0000 (Sun, 18 Nov 2007)
New Revision: 307
Modified:
trunk/oval-server/dsa2oval.py
Log:
Fix errors in dsa2oval usage
Modified: trunk/oval-server/dsa2oval.py
===================================================================
--- trunk/oval-server/dsa2oval.py 2007-11-18 19:41:37 UTC (rev 306)
+++ trunk/oval-server/dsa2oval.py 2007-11-18 19:43:29 UTC (rev 307)
@@ -106,10 +106,11 @@
"""
(path, ext) = os.path.splitext(filename)
- wmlfile = '.'.join((path, self.infoExt))
+ dsaFile = ''.join((path, self.dataExt))
+ wmlFile = ''.join((path, self.infoExt))
#Parse data file
- result = dsa.parseFile (filename)
+ result = dsa.parseFile (dsaFile)
if result:
if self.dsaref.has_key (result[0]):
for (k, v) in result[1].iteritems():
@@ -118,7 +119,7 @@
self.dsaref[result[0]] = result[1]
#Parse wml file
- result = wml.parseFile(wmlfile)
+ result = wml.parseFile(wmlFile)
if result:
if self.dsaref.has_key (result[0]):
for (k, v) in result[1].iteritems():
@@ -169,8 +170,12 @@
logging.basicConfig(level=logging.ERROR)
walker = Walker();
+ if opts.has_key('-f'):
+ walker.parseFile (opts['-f'])
+ walker.printDSA()
+ sys.exit(0)
+
if opts.has_key('-d'):
walker.parseDir(opts['-d'], 2)
- if opts.has_key('-f'):
- walker.parseFile (opts['-f'])
- walker.printDSA()
\ No newline at end of file
+ walker.printDSA()
+ sys.exit(0)
\ No newline at end of file
More information about the Oval-commits
mailing list