Author: duncan
Date: Sat Jun 2 21:20:39 2007
New Revision: 9637
Modified:
branches/rel-1/freevo/src/video/plugins/xine.py
Log:
Added a try finally block around the open
Added a check that position is set
Removed a redundant quit
Modified: branches/rel-1/freevo/src/video/plugins/xine.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/xine.py (original)
+++ branches/rel-1/freevo/src/video/plugins/xine.py Sat Jun 2 21:20:39 2007
@@ -197,13 +197,15 @@
if not self.app:
return
- self.app.stop('quit\n')
command = "%s -S get_time" % config.CONF.xine
handle = os.popen(command,'r')
- position = handle.read();
- handle.close()
- _debug_("Elapsed = %s" % position)
- self.item.elapsed = int(position)
+ try:
+ position = handle.read();
+ _debug_("Elapsed = %s" % position)
+ if position:
+ self.item.elapsed = int(position)
+ finally:
+ handle.close()
self.app.stop('quit\n')
rc.app(None)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog