Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
abe6ef45
Commit
abe6ef45
authored
Aug 18, 2016
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use optparse's bad translation strings in passthrough_opts
parent
38fe6e6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
pavelib/utils/passthrough_opts.py
+5
-14
No files found.
pavelib/utils/passthrough_opts.py
View file @
abe6ef45
...
...
@@ -13,15 +13,6 @@ import paver.tasks
from
mock
import
patch
try
:
from
gettext
import
gettext
except
ImportError
:
def
gettext
(
message
):
"""Dummy gettext"""
return
message
_
=
gettext
class
PassthroughOptionParser
(
OptionParser
):
"""
An :class:`optparse.OptionParser` which captures any unknown options into
...
...
@@ -66,9 +57,9 @@ class PassthroughOptionParser(OptionParser):
if
len
(
rargs
)
<
nargs
:
if
nargs
==
1
:
self
.
error
(
_
(
"
%
s option requires an argument"
)
%
opt
)
self
.
error
(
"
%
s option requires an argument"
%
opt
)
else
:
self
.
error
(
_
(
"
%
s option requires
%
d arguments"
)
self
.
error
(
"
%
s option requires
%
d arguments"
%
(
opt
,
nargs
))
elif
nargs
==
1
:
value
=
rargs
.
pop
(
0
)
...
...
@@ -77,7 +68,7 @@ class PassthroughOptionParser(OptionParser):
del
rargs
[
0
:
nargs
]
elif
had_explicit_value
:
self
.
error
(
_
(
"
%
s option does not take a value"
)
%
opt
)
self
.
error
(
"
%
s option does not take a value"
%
opt
)
else
:
value
=
None
...
...
@@ -111,9 +102,9 @@ class PassthroughOptionParser(OptionParser):
nargs
=
option
.
nargs
if
len
(
rargs
)
<
nargs
:
if
nargs
==
1
:
self
.
error
(
_
(
"
%
s option requires an argument"
)
%
opt
)
self
.
error
(
"
%
s option requires an argument"
%
opt
)
else
:
self
.
error
(
_
(
"
%
s option requires
%
d arguments"
)
self
.
error
(
"
%
s option requires
%
d arguments"
%
(
opt
,
nargs
))
elif
nargs
==
1
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment