[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8356 - trunk/gnue-common/src/apps
From: |
jcater |
Subject: |
[gnue] r8356 - trunk/gnue-common/src/apps |
Date: |
Tue, 4 Apr 2006 20:08:34 -0500 (CDT) |
Author: jcater
Date: 2006-04-04 20:08:34 -0500 (Tue, 04 Apr 2006)
New Revision: 8356
Modified:
trunk/gnue-common/src/apps/RuntimeSettings.py
trunk/gnue-common/src/apps/__init__.py
Log:
runtime settings won't completely fail if one listener fails
Modified: trunk/gnue-common/src/apps/RuntimeSettings.py
===================================================================
--- trunk/gnue-common/src/apps/RuntimeSettings.py 2006-04-04 18:54:07 UTC
(rev 8355)
+++ trunk/gnue-common/src/apps/RuntimeSettings.py 2006-04-05 01:08:34 UTC
(rev 8356)
@@ -38,7 +38,7 @@
location = None
def init(configFilename="default.ini", homeConfigDir=".gnue"):
- global location, config
+ global location, config
if os.environ.has_key('HOME'):
try:
os.makedirs(os.path.join(os.environ['HOME'], homeConfigDir))
@@ -87,21 +87,21 @@
if location:
try:
fh = open(location,'w')
- try:
- for h in instance._runtimes:
- section, hash = h.saveRuntimeSettings()
+ for h in instance._runtimes:
+ try:
+ section, hash = h.saveRuntimeSettings()
+ except:
+ print o(u_("Warning: Unable to save all session data to %s") %
+ location)
+ if _DEBUG_LEVELS != [0]:
+ raise
if len(hash.keys()):
if not config.has_section(section):
config.add_section(section)
for key in hash.keys():
config.set(section, key, "%s" % hash[key])
- config.write(fh)
- except:
- print o(u_("\nWarning: Unable to save session data to %s\n") %
- location)
- if _DEBUG_LEVELS != [0]:
- raise
+ config.write(fh)
fh.close()
except:
print o(u_("\nWarning: Unable to save session data to %s\n") % location)
Modified: trunk/gnue-common/src/apps/__init__.py
===================================================================
--- trunk/gnue-common/src/apps/__init__.py 2006-04-04 18:54:07 UTC (rev
8355)
+++ trunk/gnue-common/src/apps/__init__.py 2006-04-05 01:08:34 UTC (rev
8356)
@@ -34,9 +34,14 @@
# Add gStartupStatus global for startup status dialogs
-__builtins__['gStartupStatus'] = lambda string:string
+def _printStartupStatus(text):
+ print ' * %s' % text
+import __builtin__
+__builtin__.__dict__['gStartupStatus'] = _printStartupStatus
+
+
# Add the decimal class for python 2.3 or less
#if sys.hexversion < 0x02040000:
# pth = sys.path
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8356 - trunk/gnue-common/src/apps,
jcater <=