ajack 2003/09/26 12:25:35
Modified: python/gump update.py xmlutils.py
Log:
1) Found out there are two .cvspass formats, trying to cope w/ both
2) Try 2 at handling bad content (SF.net is returning HTML descriptors not XML from
viewcvs.py).
I'd expect a 3rd, minumum.
Revision Changes Path
1.13 +13 -4 jakarta-gump/python/gump/update.py
Index: update.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/update.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- update.py 26 Sep 2003 19:09:52 -0000 1.12
+++ update.py 26 Sep 2003 19:25:35 -0000 1.13
@@ -109,7 +109,16 @@
try:
cvspass=open(cvspassfile)
for line in cvspass.readlines():
- logins.update(dict([line.strip().split(' ',1)]))
+ clean=line.strip()
+ parts=clean.split(' ')
+ root=parts[0]
+ mangle=parts[1]
+ # Cope with new format .cvspass
+ if len(parts) > 2:
+ root=parts[1]
+ mangle=parts[2]
+ # Stash this mangle for this root
+ logins[root]=mangle
cvspass.close()
except Exception, detail:
1.3 +2 -1 jakarta-gump/python/gump/xmlutils.py
Index: xmlutils.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/xmlutils.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xmlutils.py 26 Sep 2003 19:09:52 -0000 1.2
+++ xmlutils.py 26 Sep 2003 19:25:35 -0000 1.3
@@ -212,7 +212,8 @@
try:
element=SAXDispatcher(open(newHref),cls.__name__.lower(),cls).docElement
except Exception, detail:
- log.error('Failed to parse [' + newHref + ']. Details: ' + str(detail))
+ log.error('Failed to parse [' + newHref + ']. Details: ' + str(detail))
+ element=None
else:
# :TODO: Set any object "invalid"?
log.warn("href:"+newHref+" not loaded")
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]