MCPcopy
hub / github.com/httpie/cli / as_silent

Method as_silent

httpie/context.py:158–168  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

156
157 @contextmanager
158 def as_silent(self) -> Iterator[None]:
159 original_stdout = self.stdout
160 original_stderr = self.stderr
161
162 try:
163 self.stdout = self.devnull
164 self.stderr = self.devnull
165 yield
166 finally:
167 self.stdout = original_stdout
168 self.stderr = original_stderr
169
170 def log_error(self, msg: str, level: LogLevel = LogLevel.ERROR) -> None:
171 if self.stdout_isatty and self.quiet >= LOG_LEVEL_DISPLAY_THRESHOLDS[level]:

Callers 1

is_http_commandFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected