diff options
| author | rha@tinyerp.com <> | 2010-12-28 13:48:10 +0530 |
|---|---|---|
| committer | rha@tinyerp.com <> | 2010-12-28 13:48:10 +0530 |
| commit | 8d744f2e9e657dbdb4ea90f207b7328edb6b6b90 (patch) | |
| tree | a570856f09161e95ac995e6a18fbb03cff723a2a /addons/document_webdav/test_davclient.py | |
| parent | f8b87f9a66ea95dea68ded6209ef57c33f18702a (diff) | |
| parent | 6d84b87556364fbc31973fd7e2a9832f40568cbe (diff) | |
[Merge]: Merge with addons2
bzr revid: rha@tinyerp.com-20101228081810-8pvhyohep36quda2
Diffstat (limited to 'addons/document_webdav/test_davclient.py')
| -rw-r--r-- | addons/document_webdav/test_davclient.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/document_webdav/test_davclient.py b/addons/document_webdav/test_davclient.py index ac40d1a3d30..c9c6bb35f28 100644 --- a/addons/document_webdav/test_davclient.py +++ b/addons/document_webdav/test_davclient.py @@ -324,7 +324,7 @@ class DAVClient(object): """An instance of a WebDAV client, connected to the OpenERP server """ - def __init__(self, user=None, passwd=None, dbg=0, use_ssl=False, useragent=False): + def __init__(self, user=None, passwd=None, dbg=0, use_ssl=False, useragent=False, timeout=None): if use_ssl: self.host = config.get_misc('httpsd', 'interface', False) self.port = config.get_misc('httpsd', 'port', 8071) @@ -346,6 +346,7 @@ class DAVClient(object): self.user = user self.passwd = passwd self.dbg = dbg + self.timeout = timeout or 5.0 # seconds, tests need to respond pretty fast! self.hdrs = {} if useragent: self.set_useragent(useragent) @@ -386,7 +387,7 @@ class DAVClient(object): dbg = self.dbg hdrs.update(self.hdrs) log.debug("Getting %s http://%s:%d/%s", method, self.host, self.port, path) - conn = httplib.HTTPConnection(self.host, port=self.port) + conn = httplib.HTTPConnection(self.host, port=self.port, timeout=self.timeout) conn.set_debuglevel(dbg) if not path: path = "/index.html" |
