Browse files

adding a timeout on the simple_command_runner

  • Loading branch information...
1 parent 99eb2bf commit 594d5e1f4d170d7eea6d8f02ba8523bca1b1120b @knorby committed Oct 17, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 boxeeremotelib/remote_commands.py
View
6 boxeeremotelib/remote_commands.py
@@ -7,6 +7,10 @@
from .utils import MultiBoolCallbackHandler
class Command(object):
+ '''
+
+ '''
+
RESPONSE_EXPR = re.compile(r"<html>\n<li>(.*?)</html>")
@@ -55,7 +59,7 @@ def __repr__(self):
def simple_command_runner(cmd, cb=None):
try:
- res = cmd.handle_response(urllib2.urlopen(cmd.get_url()))
+ res = cmd.handle_response(urllib2.urlopen(cmd.get_url(), timeout=1))
if cb:
cb(res)
except urllib2.URLError, e:

0 comments on commit 594d5e1

Please sign in to comment.