Permalink
Browse files

Small updates for RHEL5.

  • Loading branch information...
1 parent 71fbff8 commit c49cae1d02dd6e7c16dffde78a79dc3e130e7afb @dagwieers committed Apr 20, 2007
Showing with 13 additions and 4 deletions.
  1. +5 −2 sarahdb.py
  2. +3 −0 sarahinfo.py
  3. +2 −1 sarahlib.py
  4. +3 −1 sarahsql.py
View
@@ -52,7 +52,7 @@ def findall(ro, el, fail=False):
sarahlib.createtb(cur, 'rpm')
sarahlib.createtb(cur, 'pro')
-filelist = glob.glob('advisories/RH?A-*.xml')
+filelist = glob.glob('advisories/RH?A-*.xml') + glob.glob('advisories.rhn/RH?A-*.xml')
if filelist:
print 'Using %s advisories from: ./advisories/' % len(filelist)
else:
@@ -122,6 +122,9 @@ def findall(ro, el, fail=False):
if refrec['reftype'] == 'self':
refrec['refid'] = advrec['advid']
refrec['reference'] = refnode.text
+ elif refrec['reftype'] == 'external':
+ refrec['refid'] = advrec['advid']
+ refrec['reference'] = elattr(refnode, 'href')
elif refnode.findtext('advisory'):
refrec['refid'] = findel(refnode, 'advisory')
refrec['reference'] = elattr(refnode, 'href')
@@ -136,7 +139,7 @@ def findall(ro, el, fail=False):
refrec['reference'] = elattr(refnode, 'href')
else:
refrec['refid'] = 'error'
-# raise Exception, 'refid not found.'
+ raise Exception, 'refid not found for reftype %s.' % refrec['reftype']
refrec['summary'] = findel(refnode, 'summary', fail=False)
View
@@ -63,6 +63,9 @@
elif key in ('4AS', '4ES', '4WS', '4Desktop'):
print '%s: %s ' % (key, count[key]),
continue
+ elif key in ('5Server', '5Client', '5Desktop'):
+ print '%s: %s ' % (key, count[key]),
+ continue
else:
c[i] += count[key]
print 'Other (%s): %s\n ' % (j, c[j]),
View
@@ -1,4 +1,5 @@
-import os, sqlite, types
+import os, types
+import sqlite
dbase = 'sarahdb.sqlite'
View
@@ -1,8 +1,10 @@
#!/usr/bin/python
-import sys, os, sqlite, string
+import sys, os, string
+import sqlite
import sarahlib
+
sys.stdout = os.fdopen(1, 'w', 0)
con, cur = sarahlib.opendb()

0 comments on commit c49cae1

Please sign in to comment.