Show More
@@ -24,6 +24,7 b' class StatsdClientClass(Singleton):' | |||
|
24 | 24 | setup_run = False |
|
25 | 25 | statsd_client = None |
|
26 | 26 | statsd = None |
|
27 | strict_mode_init = False | |
|
27 | 28 | |
|
28 | 29 | def __getattribute__(self, name): |
|
29 | 30 | |
@@ -31,8 +32,9 b' class StatsdClientClass(Singleton):' | |||
|
31 | 32 | if self.setup_run: |
|
32 | 33 | return super(StatsdClientClass, self).__getattribute__(name) |
|
33 | 34 | else: |
|
35 | if self.strict_mode_init: | |
|
36 | raise StatsdClientNotInitialised(f"requested key was {name}") | |
|
34 | 37 | return None |
|
35 | #raise StatsdClientNotInitialised("requested key was %s" % name) | |
|
36 | 38 | |
|
37 | 39 | return super(StatsdClientClass, self).__getattribute__(name) |
|
38 | 40 | |
@@ -40,6 +42,8 b' class StatsdClientClass(Singleton):' | |||
|
40 | 42 | """ |
|
41 | 43 | Initialize the client |
|
42 | 44 | """ |
|
45 | strict_init_mode = settings.pop('statsd_strict_init', False) | |
|
46 | ||
|
43 | 47 | statsd = client_from_config(settings) |
|
44 | 48 | self.statsd = statsd |
|
45 | 49 | self.statsd_client = statsd |
@@ -73,7 +73,7 b' def _create_auth_baton(pool):' | |||
|
73 | 73 | 'svn_auth_get_ssl_client_cert_file_provider', |
|
74 | 74 | 'svn_auth_get_windows_simple_provider', |
|
75 | 75 | 'svn_auth_get_windows_ssl_server_trust_provider', |
|
76 |
|
|
|
76 | ] | |
|
77 | 77 | |
|
78 | 78 | providers = [] |
|
79 | 79 | |
@@ -90,7 +90,7 b' def _create_auth_baton(pool):' | |||
|
90 | 90 | client.get_ssl_client_cert_file_provider(), |
|
91 | 91 | client.get_ssl_client_cert_pw_file_provider(), |
|
92 | 92 | client.get_ssl_server_trust_file_provider(), |
|
93 |
|
|
|
93 | ] | |
|
94 | 94 | |
|
95 | 95 | return core.svn_auth_open(providers, pool) |
|
96 | 96 |
@@ -40,7 +40,7 b' from dulwich.repo import Repo as Dulwich' | |||
|
40 | 40 | from dulwich.server import update_server_info |
|
41 | 41 | |
|
42 | 42 | from vcsserver import exceptions, settings, subprocessio |
|
43 | from vcsserver.str_utils import safe_str, safe_int | |
|
43 | from vcsserver.str_utils import safe_str, safe_int, safe_bytes | |
|
44 | 44 | from vcsserver.base import RepoFactory, obfuscate_qs, ArchiveNode, archive_repo |
|
45 | 45 | from vcsserver.hgcompat import ( |
|
46 | 46 | hg_url as url_parser, httpbasicauthhandler, httpdigestauthhandler) |
@@ -824,12 +824,12 b' class GitRemote(RemoteBase):' | |||
|
824 | 824 | |
|
825 | 825 | @reraise_safe_exceptions |
|
826 | 826 | def init(self, wire): |
|
827 |
repo_path = s |
|
|
827 | repo_path = safe_str(wire['path']) | |
|
828 | 828 | self.repo = Repo.init(repo_path) |
|
829 | 829 | |
|
830 | 830 | @reraise_safe_exceptions |
|
831 | 831 | def init_bare(self, wire): |
|
832 |
repo_path = s |
|
|
832 | repo_path = safe_str(wire['path']) | |
|
833 | 833 | self.repo = Repo.init_bare(repo_path) |
|
834 | 834 | |
|
835 | 835 | @reraise_safe_exceptions |
General Comments 0
You need to be logged in to leave comments.
Login now