Make convert_to_unicode handle bytearray.

Review Request #6679 — Created Dec. 5, 2014 and submitted

Information

Review Board
release-2.0.x
4d2fbbd...

Reviewers

Some SCM backends (notably Perforce), when dealing with files which are marked
as binary but aren't actually binary, will return a bytearray instead of bytes.
This wasn't properly handled in our unicode conversion step. I've fixed it to
check if the input is a bytearray, and convert it to bytes if needed.

Manually called convert_to_unicode with a bytearray and saw that it no longer
raised an error.

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/diffviewer/diffutils.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/diffviewer/diffutils.py
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (b682468)
Loading...