From 2a9b0cc6e92189b42fadf44da2d85e1d7a8b4dee Mon Sep 17 00:00:00 2001 From: Antti Ajanki Date: Tue, 12 Jul 2011 10:03:21 +0300 Subject: Remove temporary file --- src/webvicli/webvicli/client.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/webvicli/webvicli/client.py b/src/webvicli/webvicli/client.py index c15f073..78e1a2d 100644 --- a/src/webvicli/webvicli/client.py +++ b/src/webvicli/webvicli/client.py @@ -505,6 +505,18 @@ class WVClient: if retcode > 0: print 'Player failed with returncode', retcode else: + # After the player has finished, the library + # generates a read event on a control socket. When + # the client calls perform on the socket the + # library removes temporary files. + readfds, writefds = webvi.api.fdset()[1:3] + readyread, readywrite, readyexc = \ + select.select(readfds, writefds, [], 0.1) + for fd in readyread: + webvi.api.perform(fd, WebviSelectBitmask.READ) + for fd in readywrite: + webvi.api.perform(fd, WebviSelectBitmask.WRITE) + return True except OSError, err: print 'Execution failed:', err -- cgit v1.2.3