Skip to content

Commit 66072fc

Browse files
author
Carlos M. Esterlizi
committed
pycurl speed & verbose options
1 parent 1410e86 commit 66072fc

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pyc
2+
/**/*.pyc

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from setuptools.command.test import test as TestCommand
88
from setuptools.command.install import install as InstallCommand
99

10-
version = "1.0.6"
10+
version = "1.0.7"
1111
requirements = "libxml2-dev libxslt-dev python-dev libcurl4-openssl-dev python-pycurl"
1212

1313
class Install(InstallCommand):

webdav/client.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
except ImportError:
1717
from urllib import unquote
1818

19-
__version__ = "1.0.6"
19+
__version__ = "1.0.7"
2020

2121

2222
def listdir(directory):
@@ -164,6 +164,15 @@ def Request(self, options=None):
164164
if self.webdav.key_path:
165165
self.default_options['SSLKEY'] = self.webdav.key_path
166166

167+
if self.webdav.recv_speed:
168+
self.default_options['MAX_RECV_SPEED_LARGE'] = self.webdav.recv_speed
169+
170+
if self.webdav.send_speed:
171+
self.default_options['MAX_SEND_SPEED_LARGE'] = self.webdav.send_speed
172+
173+
if self.webdav.verbose:
174+
self.default_options['VERBOSE'] = self.webdav.verbose
175+
167176
if self.default_options:
168177
add_options(curl, self.default_options)
169178

webdav/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class WebDAVSettings(ConnectionSettings):
2121

2222
ns = "webdav:"
2323
prefix = "webdav_"
24-
keys = {'hostname', 'login', 'password', 'token', 'root', 'cert_path', 'key_path'}
24+
keys = {'hostname', 'login', 'password', 'token', 'root', 'cert_path', 'key_path', 'recv_speed', 'send_speed', 'verbose'}
2525

2626
def __init__(self, options):
2727

@@ -78,4 +78,4 @@ def is_valid(self):
7878

7979
if self.login or self.password:
8080
if not self.hostname:
81-
raise OptionNotValid(name="hostname", value=self.hostname, ns=self.ns)
81+
raise OptionNotValid(name="hostname", value=self.hostname, ns=self.ns)

0 commit comments

Comments
 (0)