Skip to content
Browse files

command: less naive pause implemenation, fixes #6

 - allows chaining of pause commands rather than coalescing into a single
 pause upfront pause
  • Loading branch information...
1 parent 4cd3d5c commit cdf75b3477c5ef0858ffd4147f46f49870084e58 @sibson committed Jun 7, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 vncdotool/command.py
View
7 vncdotool/command.py
@@ -13,7 +13,7 @@
import os
-from twisted.internet import reactor
+from twisted.internet import reactor, defer
from twisted.python import log
from vncdotool.client import VNCDoToolFactory, VNCDoToolClient
from vncdotool.loggingproxy import VNCLoggingServerFactory
@@ -64,8 +64,9 @@ def format_help(self, **kwargs):
def pause(client, duration):
- time.sleep(duration)
- return client
+ d = defer.Deferred()
+ reactor.callLater(duration, d.callback, client)
+ return d
def build_command_list(factory, args):
client = VNCDoToolClient

0 comments on commit cdf75b3

Please sign in to comment.
Something went wrong with that request. Please try again.