Skip to content

Commit

Permalink
workaround to fix encoding issue for fedora 19. Fixes ros#6637
Browse files Browse the repository at this point in the history
  • Loading branch information
tfoote committed Jan 3, 2015
1 parent 5ab7e12 commit 96b3dbf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_url_validity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import print_function


from io import BytesIO
from io import StringIO
import os
import subprocess
import yaml
Expand Down Expand Up @@ -51,7 +51,9 @@ def detect_lines(diffstr):
"""Take a diff string and return a dict of
files with line numbers changed"""
resultant_lines = {}
io = BytesIO(diffstr)
# Force utf-8 re: https://github.com/ros/rosdistro/issues/6637
encoding = 'utf-8'
io = StringIO(unicode(diffstr, encoding))
udiff = unidiff.PatchSet(io)
for file in udiff:
target_lines = []
Expand Down

0 comments on commit 96b3dbf

Please sign in to comment.