Author: duncan
Date: Sun Feb 24 12:41:53 2008
New Revision: 10432

Log:
The flush can fail during shutdown, this should stop it crashing in this case


Modified:
   branches/rel-1-7/freevo/src/audio/plugins/mpdclient2.py
   branches/rel-1/freevo/src/audio/plugins/mpdclient2.py

Modified: branches/rel-1-7/freevo/src/audio/plugins/mpdclient2.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/mpdclient2.py     (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/mpdclient2.py     Sun Feb 24 
12:41:53 2008
@@ -44,7 +44,10 @@
 
     def putline(self, line):
         self.file.write("%s\n" % line)
-        self.file.flush()
+        try:
+            self.file.flush()
+        except:
+            pass
         self.done = False
 
     def get_pair(self):

Modified: branches/rel-1/freevo/src/audio/plugins/mpdclient2.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/mpdclient2.py       (original)
+++ branches/rel-1/freevo/src/audio/plugins/mpdclient2.py       Sun Feb 24 
12:41:53 2008
@@ -44,7 +44,10 @@
 
     def putline(self, line):
         self.file.write("%s\n" % line)
-        self.file.flush()
+        try:
+            self.file.flush()
+        except:
+            pass
         self.done = False
 
     def get_pair(self):

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to