Show More
@@ -23,15 +23,23 b' Holds connection for remote server.' | |||||
23 | """ |
|
23 | """ | |
24 |
|
24 | |||
25 |
|
25 | |||
26 | def _not_initialized(*args, **kwargs): |
|
26 | class NotInitializedConnection(object): | |
27 | """Placeholder for objects which have to be initialized first.""" |
|
27 | """Placeholder for objects which have to be initialized first.""" | |
28 | raise Exception( |
|
28 | ||
29 | "rhodecode.lib.vcs is not yet initialized. " |
|
29 | def _raise_exc(self): | |
30 | "Make sure `vcs.server` is enabled in your configuration.") |
|
30 | raise Exception( | |
|
31 | "rhodecode.lib.vcs is not yet initialized. " | |||
|
32 | "Make sure `vcs.server` is enabled in your configuration.") | |||
|
33 | ||||
|
34 | def __getattr__(self, item): | |||
|
35 | self._raise_exc() | |||
|
36 | ||||
|
37 | def __call__(self, *args, **kwargs): | |||
|
38 | self._raise_exc() | |||
31 |
|
39 | |||
32 | # TODO: figure out a nice default value for these things |
|
40 | # TODO: figure out a nice default value for these things | |
33 |
Service = |
|
41 | Service = NotInitializedConnection() | |
34 |
|
42 | |||
35 |
Git = |
|
43 | Git = NotInitializedConnection() | |
36 |
Hg = |
|
44 | Hg = NotInitializedConnection() | |
37 |
Svn = |
|
45 | Svn = NotInitializedConnection() |
General Comments 0
You need to be logged in to leave comments.
Login now