[Spambayes-checkins]
spambayes/Outlook2000/dialogs __init__.py, 1.8, 1.9
Mark Hammond
mhammond at users.sourceforge.net
Tue Aug 26 07:42:30 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs
In directory sc8-pr-cvs1:/tmp/cvs-serv20604
Modified Files:
__init__.py
Log Message:
Oops - use fully qualified module names in the resource generation.
Index: __init__.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/__init__.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** __init__.py 26 Aug 2003 10:59:11 -0000 1.8
--- __init__.py 26 Aug 2003 13:42:28 -0000 1.9
***************
*** 5,9 ****
def LoadDialogs(rc_name = "dialogs.rc"):
base_name = os.path.splitext(rc_name)[0]
! mod_name = "resources." + base_name
mod = None
# If we are running from source code, check the .py file is up to date
--- 5,9 ----
def LoadDialogs(rc_name = "dialogs.rc"):
base_name = os.path.splitext(rc_name)[0]
! mod_name = "dialogs.resources." + base_name
mod = None
# If we are running from source code, check the .py file is up to date
***************
*** 21,26 ****
try:
mod = __import__(mod_name)
! # mod is the top-level 'resources' module
! mod = getattr(mod, base_name)
mtime = mod._rc_mtime_
size = mod._rc_size_
--- 21,25 ----
try:
mod = __import__(mod_name)
! mod = sys.modules[mod_name]
mtime = mod._rc_mtime_
size = mod._rc_size_
***************
*** 39,44 ****
if mod is None:
mod = __import__(mod_name)
! # mod is the top-level 'resources' module
! mod = getattr(mod, base_name)
return mod.FakeParser()
--- 38,42 ----
if mod is None:
mod = __import__(mod_name)
! mod = sys.modules[mod_name]
return mod.FakeParser()
More information about the Spambayes-checkins
mailing list