Skip to content

Commit

Permalink
Fix OptBucket for Python 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Harris committed Nov 11, 2015
1 parent ca3e447 commit dd93fe0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nose/sphinx/pluginopts.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ def format_help(self):
return self.doc.replace('%prog', self.prog).replace(':\n', '::\n')

def add_option(self, *arg, **kw):
kw = {k: (v.replace('\\', '\\\\') if isinstance(v, str) else v)
for (k, v) in kw.items()}
for k, v in kw.items():
if isinstance(v, str):
kw[k] = v.replace('\\', '\\\\')
self.opts.append(Opt(*arg, **kw))


Expand Down

0 comments on commit dd93fe0

Please # to comment.