Skip to content

Commit

Permalink
Decode stdout during documentation build (ros-infrastructure#628)
Browse files Browse the repository at this point in the history
I think that I'm seeing this because doc builds are happening with
python 3 on Fedora. Here is the error I'm seeing:

```
...
  File "./rosdep_doc_utils.py", line 38, in run
    nodes.literal_block(text=re.sub(escaped_capitalized_usage, '', out))
  File "/usr/lib64/python3.6/re.py", line 191, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: cannot use a string pattern on a bytes-like object
```
  • Loading branch information
cottsay authored and at-wat committed Nov 15, 2018
1 parent 53a12a5 commit 06408f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/rosdep_doc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ def run(self):
[py, '-c', "from rosdep2.main import rosdep_main;rosdep_main(['-h'])"]
)
return [
nodes.literal_block(text=re.sub(escaped_capitalized_usage, '', out))
nodes.literal_block(text=re.sub(escaped_capitalized_usage, '', out.decode()))
]
if 'install' in self.arguments:
out = subprocess.check_output(
[py, '-c', "from rosdep2.main import rosdep_main;rosdep_main(['install', '-h'])"]
)
return [
nodes.literal_block(text=re.sub(escaped_capitalized_usage, '', out))
nodes.literal_block(text=re.sub(escaped_capitalized_usage, '', out.decode()))
]


Expand Down

0 comments on commit 06408f7

Please sign in to comment.