[Spambayes-checkins] spambayes/Outlook2000/dialogs/resources
rcparser.py, 1.12, 1.13
Tony Meyer
anadelonbrin at users.sourceforge.net
Tue Jan 4 02:51:01 CET 2005
Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19622/Outlook2000/dialogs/resources
Modified Files:
rcparser.py
Log Message:
Look for dialogs.h in this directory if it isn't with dialogs.rc.
Index: rcparser.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources/rcparser.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** rcparser.py 2 Nov 2004 21:29:37 -0000 1.12
--- rcparser.py 4 Jan 2005 01:50:59 -0000 1.13
***************
*** 145,153 ****
"""
hFileName = rcFileName[:-2]+"h"
try:
h = open(hFileName, "rU")
self.parseH(h)
h.close()
! except OSError:
print "No .h file. ignoring."
f = open(rcFileName)
--- 145,162 ----
"""
hFileName = rcFileName[:-2]+"h"
+ if not os.path.exists(hFileName):
+ # Translated dialogs don't need their own copy of dialogs.h,
+ # so look for one in this directory if there isn't one in the
+ # expected place.
+ # This will only work with Python > 2.2 and as source, but
+ # it shouldn't ever be run by binary users, so that shoudln't
+ # matter.
+ hFileName = os.path.join(os.path.dirname(__file__),
+ os.path.basename(hFileName))
try:
h = open(hFileName, "rU")
self.parseH(h)
h.close()
! except IOError:
print "No .h file. ignoring."
f = open(rcFileName)
More information about the Spambayes-checkins
mailing list