Author: remi
Date: 2009-08-01 13:58:11 +0200 (Sat, 01 Aug 2009)
New Revision: 5264
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/logger/SimpleLogger.py
Log:
* Fixed a possible file IO error
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/logger/SimpleLogger.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/logger/SimpleLogger.py
2009-08-01 11:57:35 UTC (rev 5263)
+++ software_suite_v3/smart-core/smart-server/trunk/util/logger/SimpleLogger.py
2009-08-01 11:58:11 UTC (rev 5264)
@@ -121,9 +121,14 @@
if self.__target in [LOG_TARGET_FILE, LOG_TARGET_BOTH]:
if os.path.isfile(self.__logFileName):
self.__logMutex.acquire()
- f = open(self.__logFileName, 'a')
- f.write(message + "\n")
- f.close()
+ try:
+ f = open(self.__logFileName, 'a')
+ try:
+ f.write(message + "\n")
+ finally:
+ f.close()
+ except:
+ pass
self.__logMutex.release()
if self.__target in [LOG_TARGET_SHELL, LOG_TARGET_BOTH]:
print message
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn