-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd13bab
commit 8713032
Showing
2 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- a/debian/tron/opt/venvs/tron/lib/python3.8/site-packages/kubernetes/client/configuration.py | ||
+++ b/debian/tron/opt/venvs/tron/lib/python3.8/site-packages/kubernetes/client/configuration.py | ||
@@ -71,11 +71,11 @@ | ||
""" | ||
|
||
_default = None | ||
- | ||
def __init__(self, host="http://localhost", | ||
api_key=None, api_key_prefix=None, | ||
username=None, password=None, | ||
discard_unknown_keys=False, | ||
+ is_logger_used=False, | ||
): | ||
"""Constructor | ||
""" | ||
@@ -106,26 +106,28 @@ | ||
"""Password for HTTP basic authentication | ||
""" | ||
self.discard_unknown_keys = discard_unknown_keys | ||
+ self.is_logger_used = is_logger_used | ||
self.logger = {} | ||
- """Logging Settings | ||
- """ | ||
- self.logger["package_logger"] = logging.getLogger("client") | ||
- self.logger["urllib3_logger"] = logging.getLogger("urllib3") | ||
- self.logger_format = '%(asctime)s %(levelname)s %(message)s' | ||
- """Log format | ||
- """ | ||
- self.logger_stream_handler = None | ||
- """Log stream handler | ||
- """ | ||
- self.logger_file_handler = None | ||
- """Log file handler | ||
- """ | ||
- self.logger_file = None | ||
- """Debug file location | ||
- """ | ||
- self.debug = False | ||
- """Debug switch | ||
- """ | ||
+ if self.is_logger_used: | ||
+ """Logging Settings | ||
+ """ | ||
+ self.logger["package_logger"] = logging.getLogger("client") | ||
+ self.logger["urllib3_logger"] = logging.getLogger("urllib3") | ||
+ self.logger_format = '%(asctime)s %(levelname)s %(message)s' | ||
+ """Log format | ||
+ """ | ||
+ self.logger_stream_handler = None | ||
+ """Log stream handler | ||
+ """ | ||
+ self.logger_file_handler = None | ||
+ """Log file handler | ||
+ """ | ||
+ self.logger_file = None | ||
+ """Debug file location | ||
+ """ | ||
+ self.debug = False | ||
+ """Debug switch | ||
+ """ | ||
|
||
self.verify_ssl = True | ||
"""SSL/TLS verification | ||
@@ -178,11 +180,12 @@ | ||
for k, v in self.__dict__.items(): | ||
if k not in ('logger', 'logger_file_handler'): | ||
setattr(result, k, copy.deepcopy(v, memo)) | ||
- # shallow copy of loggers | ||
- result.logger = copy.copy(self.logger) | ||
- # use setters to configure loggers | ||
- result.logger_file = self.logger_file | ||
- result.debug = self.debug | ||
+ if self.is_logger_used: | ||
+ # shallow copy of loggers | ||
+ result.logger = copy.copy(self.logger) | ||
+ # use setters to configure loggers | ||
+ result.logger_file = self.logger_file | ||
+ result.debug = self.debug | ||
return result | ||
|
||
@classmethod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters