Fix a couple bugs caused by passing in unicode headers to urlopen.

Review Request #8619 — Created Jan. 16, 2017 and submitted

Information

Review Board
release-2.5.x
eabc9c4...

Reviewers

urlopen is happy to accept a unicode object for headers, but it then tries to
use the ascii codec to encode them. If the text includes something that can't
be encoded, it would fail. This change fixes up a couple places where this was
causing problems for people.

Ran unit tests.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/gitlab.py
        reviewboard/hostingsvcs/service.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/gitlab.py
        reviewboard/hostingsvcs/service.py
    
    
  2. 
      
chipx86
  1. Can you backport this to release-2.0.x?

  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (6cd4753)
Loading...