Merge "Remove the monkey patching of _ into the builtins."
This commit is contained in:
@@ -26,6 +26,7 @@ from xml.parsers import expat
|
|||||||
|
|
||||||
from quantumclient.common import constants
|
from quantumclient.common import constants
|
||||||
from quantumclient.common import exceptions as exception
|
from quantumclient.common import exceptions as exception
|
||||||
|
from quantumclient.openstack.common.gettextutils import _
|
||||||
from quantumclient.openstack.common import jsonutils
|
from quantumclient.openstack.common import jsonutils
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
@@ -26,6 +26,7 @@ from cliff import show
|
|||||||
from quantumclient.common import command
|
from quantumclient.common import command
|
||||||
from quantumclient.common import exceptions
|
from quantumclient.common import exceptions
|
||||||
from quantumclient.common import utils
|
from quantumclient.common import utils
|
||||||
|
from quantumclient.openstack.common.gettextutils import _
|
||||||
|
|
||||||
HEX_ELEM = '[0-9A-Fa-f]'
|
HEX_ELEM = '[0-9A-Fa-f]'
|
||||||
UUID_PATTERN = '-'.join([HEX_ELEM + '{8}', HEX_ELEM + '{4}',
|
UUID_PATTERN = '-'.join([HEX_ELEM + '{8}', HEX_ELEM + '{4}',
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from quantumclient.openstack.common.gettextutils import _
|
||||||
from quantumclient.quantum import v2_0 as quantumV20
|
from quantumclient.quantum import v2_0 as quantumV20
|
||||||
from quantumclient.quantum.v2_0 import network
|
from quantumclient.quantum.v2_0 import network
|
||||||
from quantumclient.quantum.v2_0 import router
|
from quantumclient.quantum.v2_0 import router
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from quantumclient.openstack.common.gettextutils import _
|
||||||
from quantumclient.quantum import v2_0 as quantumv20
|
from quantumclient.quantum import v2_0 as quantumv20
|
||||||
|
|
||||||
|
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from quantumclient.openstack.common.gettextutils import _
|
||||||
from quantumclient.quantum import v2_0 as quantumv20
|
from quantumclient.quantum import v2_0 as quantumv20
|
||||||
|
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from quantumclient.common import utils
|
from quantumclient.common import utils
|
||||||
|
from quantumclient.openstack.common.gettextutils import _
|
||||||
from quantumclient.quantum import v2_0 as quantumv20
|
from quantumclient.quantum import v2_0 as quantumv20
|
||||||
|
|
||||||
RESOURCE = 'network_gateway'
|
RESOURCE = 'network_gateway'
|
||||||
|
@@ -23,6 +23,7 @@ from cliff import show
|
|||||||
|
|
||||||
from quantumclient.common import exceptions
|
from quantumclient.common import exceptions
|
||||||
from quantumclient.common import utils
|
from quantumclient.common import utils
|
||||||
|
from quantumclient.openstack.common.gettextutils import _
|
||||||
from quantumclient.quantum import v2_0 as quantumv20
|
from quantumclient.quantum import v2_0 as quantumv20
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,6 +20,7 @@ import logging
|
|||||||
|
|
||||||
from quantumclient.common import exceptions
|
from quantumclient.common import exceptions
|
||||||
from quantumclient.common import utils
|
from quantumclient.common import utils
|
||||||
|
from quantumclient.openstack.common.gettextutils import _
|
||||||
from quantumclient.quantum import v2_0 as quantumv20
|
from quantumclient.quantum import v2_0 as quantumv20
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@ Command-line interface to the Quantum APIs
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import gettext
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@@ -642,7 +641,6 @@ class QuantumShell(app.App):
|
|||||||
|
|
||||||
|
|
||||||
def main(argv=sys.argv[1:]):
|
def main(argv=sys.argv[1:]):
|
||||||
gettext.install('quantumclient', unicode=1)
|
|
||||||
try:
|
try:
|
||||||
return QuantumShell(QUANTUM_API_VERSION).run(map(strutils.safe_decode,
|
return QuantumShell(QUANTUM_API_VERSION).run(map(strutils.safe_decode,
|
||||||
argv))
|
argv))
|
||||||
|
@@ -14,9 +14,3 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
|
||||||
import gettext
|
|
||||||
|
|
||||||
# Because we installed '_' for quantum cli in shell.py, this help unittest
|
|
||||||
# have definition of '_'
|
|
||||||
gettext.install('quantumclient', unicode=1)
|
|
||||||
|
1
tox.ini
1
tox.ini
@@ -28,5 +28,4 @@ downloadcache = ~/cache/pip
|
|||||||
# H302 import only modules
|
# H302 import only modules
|
||||||
ignore = E125,H302
|
ignore = E125,H302
|
||||||
show-source = true
|
show-source = true
|
||||||
builtins = _
|
|
||||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools
|
||||||
|
Reference in New Issue
Block a user