projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e07e931
)
[compat] correct OptionGroup invocation for Python 3 (fixes #4243)
author
Philipp Hagemeister
<phihag@phihag.de>
Thu, 20 Nov 2014 06:21:12 +0000
(07:21 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Thu, 20 Nov 2014 06:21:12 +0000
(07:21 +0100)
youtube_dl/compat.py
patch
|
blob
|
history
diff --git
a/youtube_dl/compat.py
b/youtube_dl/compat.py
index 64a97548933eadec42aa578583ce878ce2cc1e9e..adf81e7ab4f9bf8d3a8c5365d3c9f9c65b67c7da 100644
(file)
--- a/
youtube_dl/compat.py
+++ b/
youtube_dl/compat.py
@@
-302,9
+302,11
@@
else:
# Fix https://github.com/rg3/youtube-dl/issues/4223
# See http://bugs.python.org/issue9161 for what is broken
def workaround_optparse_bug9161():
+ op = optparse.OptionParser()
+ og = optparse.OptionGroup(op, 'foo')
try:
- o
ptparse.OptionGroup('foo')
.add_option('-t')
- except TypeError:
+ o
g
.add_option('-t')
+ except TypeError
as te
:
real_add_option = optparse.OptionGroup.add_option
def _compat_add_option(self, *args, **kwargs):