Skip to content

fix encoding handling when writing to stdout and log files - #280

Merged
dirk-thomas merged 7 commits into
masterfrom
dirk-thomas/bom-generated-code
Jul 31, 2019
Merged

dirk-thomas merged 7 commits into
masterfrom
dirk-thomas/bom-generated-code

Conversation

@dirk-thomas

Copy link
Copy Markdown
Member

Related to ros2/rosidl#388.

@dirk-thomas

Copy link
Copy Markdown
Member Author

With these fixes in launch the build succeeds but fails the pub/sub tests as well as results in invalid tokens in the xUnit result file: Build Status

@dirk-thomas
dirk-thomas force-pushed the dirk-thomas/bom-generated-code branch from af6ac3a to 0754d76 Compare July 19, 2019 18:41

@wjwwood wjwwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic makes sense, but I haven't tried running it. @hidmic I guess you might want to take a look before we merge it.

Comment thread launch/launch/logging/__init__.py Resolved

@wjwwood wjwwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it works on CI then it's ok for me, but @hidmic may still want to see it since he setup the logging stuff originally and not me.

@dirk-thomas

dirk-thomas commented Jul 19, 2019 •

Copy link
Copy Markdown
Member Author

The latest state of this patch passed the test execution without encode/decode exceptions: Build Status (though some tests are still failing for unrelated reasons - see ament/ament_cmake#181).

Comment thread launch/launch/logging/__init__.py Resolved
Comment thread launch/launch/logging/__init__.py Resolved
Comment thread launch/launch/logging/__init__.py Resolved

@hidmic hidmic left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dirk-thomas
dirk-thomas force-pushed the dirk-thomas/bom-generated-code branch from 3d44899 to 649ac7a Compare July 25, 2019 19:17
@dirk-thomas
dirk-thomas merged commit 7961b80 into master Jul 31, 2019
@delete-merged-branch
delete-merged-branch Bot deleted the dirk-thomas/bom-generated-code branch July 31, 2019 14:39
piraka9011 pushed a commit to aws-ros-dev/launch that referenced this pull request Aug 16, 2019
* fix output encoding of logs to be utf-8

Signed-off-by: Dirk Thomas <[email protected]>

* ensure to write to stdout log handler in a supported encoding

Signed-off-by: Dirk Thomas <[email protected]>

* replace instead of strict

Signed-off-by: Dirk Thomas <[email protected]>

* replace not needed during decode

Signed-off-by: Dirk Thomas <[email protected]>

* pass preferred encoding to decode()

Signed-off-by: Dirk Thomas <[email protected]>

* consistent API

Signed-off-by: Dirk Thomas <[email protected]>

* fix style

Signed-off-by: Dirk Thomas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working in review Waiting for review (Kanban column)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants