Code0x58 commented on a change in pull request #3580:
URL: https://github.com/apache/incubator-heron/pull/3580#discussion_r459154368



##########
File path: heron/shell/src/python/utils.py
##########
@@ -135,7 +135,7 @@ def read_chunk(filename, offset=-1, length=-1, 
escape_data=False):
   if length == -1:
     length = fstat.st_size - offset
 
-  with open(filename, "r") as fp:

Review comment:
       to be consistent with the previous behaviour (not sure it still makes 
sense), I think this would be something like:
   ```python
   with open(filename, "rb") as fp:
      ...
      if data:
          # use permissive decoding and escaping if escape_data is set, 
otherwise use strict decoding
          data = _escape_data(data) if escape_data else data.decode()




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to