[sdk/python] - Don't log if debug and no engine (#6067)

This commit is contained in:
Komal 2021-01-07 15:23:23 -08:00 committed by GitHub
parent 42f355b497
commit ae7d95eb87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -3,6 +3,9 @@ CHANGELOG
## HEAD (Unreleased)
- Fix an issue where python debug messages print unexpectedly.
[#6967](https://github.com/pulumi/pulumi/pull/6067)
- [CLI] Add `version` to the stack history output to be able to
correlate events back to the Pulumi SaaS
[#6063](https://github.com/pulumi/pulumi/pull/6063)

View file

@ -38,8 +38,6 @@ def debug(msg: str, resource: Optional['Resource'] = None, stream_id: Optional[i
engine = get_engine()
if engine is not None:
_log(engine, engine_pb2.DEBUG, msg, resource, stream_id, ephemeral)
else:
print("debug: " + msg, file=sys.stderr)
def info(msg: str, resource: Optional['Resource'] = None, stream_id: Optional[int] = None, ephemeral: Optional[bool] = None) -> None: