mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-06 13:18:42 +02:00
Inject no-op print() into http.client when http debugging is off
This solves a crash that occasionaly occurs - osc tries to use a function that is not there
This commit is contained in:
@@ -53,6 +53,7 @@ class MockRequest:
|
||||
|
||||
def enable_http_debug(config):
|
||||
if not int(config["http_debug"]) and not int(config["http_full_debug"]):
|
||||
http.client.print = lambda *args, **kwargs: None
|
||||
return
|
||||
|
||||
# HACK: override HTTPResponse's init to increase debug level
|
||||
|
Reference in New Issue
Block a user