Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor docker runner, updated logging #17542

Open
wants to merge 2 commits into
base: develop2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion conan/api/conan_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
from typing import Optional

from conan.api.output import init_colorama
from conan.api.subapi.cache import CacheAPI
Expand Down Expand Up @@ -26,7 +27,7 @@


class ConanAPI:
def __init__(self, cache_folder=None):
def __init__(self, cache_folder: Optional[str]=None):

version = sys.version_info
if version.major == 2 or version.minor < 6:
Expand Down
7 changes: 5 additions & 2 deletions conan/api/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def rewrite_line(self, line):
self.stream.flush()
self._color = tmp_color

def _write_message(self, msg, fg=None, bg=None):
def _write_message(self, msg, fg=None, bg=None, newline=True):
if isinstance(msg, dict):
# For traces we can receive a dict already, we try to transform then into more natural
# text
Expand All @@ -206,8 +206,11 @@ def _write_message(self, msg, fg=None, bg=None):
else:
ret += "{}".format(msg)

if newline:
ret = "%s\n" % ret

with self.lock:
self.stream.write("{}\n".format(ret))
self.stream.write(ret)
self.stream.flush()

def trace(self, msg):
Expand Down
Loading
Loading