MCPcopy Create free account
hub / github.com/CloudPolis/webdav-client-python / is_valid

Method is_valid

webdav/connection.py:38–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36 self.root = self.root.rstrip(Urn.separate)
37
38 def is_valid(self):
39
40 if not self.hostname:
41 raise OptionNotValid(name="hostname", value=self.hostname, ns=self.ns)
42
43 if self.cert_path and not exists(self.cert_path):
44 raise OptionNotValid(name="cert_path", value=self.cert_path, ns=self.ns)
45
46 if self.key_path and not exists(self.key_path):
47 raise OptionNotValid(name="key_path", value=self.key_path, ns=self.ns)
48
49 if self.key_path and not self.cert_path:
50 raise OptionNotValid(name="cert_path", value=self.cert_path, ns=self.ns)
51
52 if self.password and not self.login:
53 raise OptionNotValid(name="login", value=self.login, ns=self.ns)
54
55 if not self.token and not self.login:
56 raise OptionNotValid(name="login", value=self.login, ns=self.ns)
57
58
59class ProxySettings(ConnectionSettings):

Callers

nothing calls this directly

Calls 1

OptionNotValidClass · 0.85

Tested by

no test coverage detected