Skip to content

dogwrap python3 string changes#236

Merged
yannmh merged 1 commit intoDataDog:masterfrom
martin308:encoding
Dec 1, 2017
Merged

dogwrap python3 string changes#236
yannmh merged 1 commit intoDataDog:masterfrom
martin308:encoding

Conversation

@martin308
Copy link
Copy Markdown
Contributor

Wrapping a command with python3 is broken due to string changes in python3. This decodes the string using the _fwd_out encoding.

Another option is to just use the utf-8 decoded line below for both.

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/dbt/src/datadog/datadog/dogshell/wrap.py", line 68, in run
    self._fwd_out.write(line)
TypeError: write() argument must be str, not bytes

@agamdua
Copy link
Copy Markdown

agamdua commented Nov 8, 2017

Would be great if this patch is accepted and a release is made, many distros include >Python3.5 by default, and installing python2 just to use dogwrap for a cron job wouldn't make sense.

@yannmh yannmh self-assigned this Dec 1, 2017
@yannmh
Copy link
Copy Markdown

yannmh commented Dec 1, 2017

The changes look good. Thanks @martin308 !

@yannmh yannmh merged commit ce6fdc4 into DataDog:master Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants