Skip to content

Commit

Permalink
Move salt.utils.six to salt.ext.six
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed Nov 18, 2014
1 parent 28f7697 commit d0ba57f
Show file tree
Hide file tree
Showing 223 changed files with 314 additions and 312 deletions.
2 changes: 1 addition & 1 deletion salt/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import logging
import random
import getpass
from salt.utils.six.moves import input
from salt.ext.six.moves import input

# Import salt libs
import salt.config
Expand Down
2 changes: 1 addition & 1 deletion salt/auth/pam.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# Import Salt libs
from salt.utils import get_group_list
from salt.utils.six.moves import range
from salt.ext.six.moves import range

LIBPAM = CDLL(find_library('pam'))
LIBC = CDLL(find_library('c'))
Expand Down
2 changes: 1 addition & 1 deletion salt/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
SaltClientError,
EauthAuthenticationError,
)
import salt.utils.six as six
import salt.ext.six as six

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion salt/cli/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import salt.client
import salt.output
from salt.utils import print_cli
from salt.utils.six.moves import range
from salt.ext.six.moves import range


class Batch(object):
Expand Down
2 changes: 1 addition & 1 deletion salt/cli/caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import salt.payload
import salt.transport
import salt.utils.args
from salt.utils.six import string_types
from salt.ext.six import string_types
from salt.log import LOG_LEVELS
from salt.utils import print_cli
from salt.utils import kinds
Expand Down
4 changes: 2 additions & 2 deletions salt/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import logging
import errno
from datetime import datetime
from salt.utils.six import string_types
from salt.ext.six import string_types

# Import salt libs
import salt.config
Expand All @@ -43,7 +43,7 @@
from salt.exceptions import (
EauthAuthenticationError, SaltInvocationError, SaltReqTimeoutError
)
import salt.utils.six as six
import salt.ext.six as six

# Import third party libs
try:
Expand Down
4 changes: 2 additions & 2 deletions salt/client/ssh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import time
import yaml
import uuid
from salt.utils.six.moves import input
from salt.ext.six.moves import input

# Import salt libs
import salt.client.ssh.shell
Expand All @@ -38,7 +38,7 @@
import salt.utils.thin
import salt.utils.verify
import salt.utils.network
from salt.utils.six import string_types
from salt.ext.six import string_types
from salt.utils import is_windows

try:
Expand Down
2 changes: 1 addition & 1 deletion salt/client/ssh/wrapper/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import salt.loader
import salt.minion
import salt.log
from salt.utils.six import string_types
from salt.ext.six import string_types

log = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions salt/cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import logging
import multiprocessing
from itertools import groupby
from salt.utils.six.moves import input
from salt.ext.six.moves import input

# Import salt.cloud libs
from salt.exceptions import (
Expand All @@ -34,7 +34,7 @@
import salt.utils
import salt.utils.cloud
from salt.utils import context
from salt.utils.six import string_types
from salt.ext.six import string_types
from salt.template import compile_template

# Import third party libs
Expand Down
4 changes: 2 additions & 2 deletions salt/cloud/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import os
import sys
import logging
from salt.utils.six.moves import input
from salt.ext.six.moves import input

# Import salt libs
import salt.config
Expand All @@ -30,7 +30,7 @@
# Import salt.cloud libs
import salt.cloud
from salt.exceptions import SaltCloudException, SaltCloudSystemExit
import salt.utils.six as six
import salt.ext.six as six

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion salt/cloud/clouds/botocore_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import salt.config as config
from salt.utils import namespaced_function
from salt.exceptions import SaltCloudException, SaltCloudSystemExit
import salt.utils.six as six
import salt.ext.six as six

# Import libcloudfuncs and libcloud_aws, required to latter patch __opts__
try:
Expand Down
8 changes: 4 additions & 4 deletions salt/cloud/clouds/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
import pprint
import logging
import yaml
import salt.utils.six as six
from salt.utils.six.moves import map
from salt.utils.six.moves import zip
from salt.utils.six.moves import range
import salt.ext.six as six
from salt.ext.six.moves import map
from salt.ext.six.moves import zip
from salt.ext.six.moves import range

# Import libs for talking to the EC2 API
import hmac
Expand Down
10 changes: 5 additions & 5 deletions salt/cloud/clouds/joyent.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# Import python libs
import os
import copy
import salt.utils.six.moves.http_client # pylint: disable=E0611
import salt.ext.six.moves.http_client # pylint: disable=E0611
import requests
import json
import logging
Expand Down Expand Up @@ -87,10 +87,10 @@
POLL_ALL_LOCATIONS = True

VALID_RESPONSE_CODES = [
salt.utils.six.moves.http_client.OK,
salt.utils.six.moves.http_client.ACCEPTED,
salt.utils.six.moves.http_client.CREATED,
salt.utils.six.moves.http_client.NO_CONTENT
salt.ext.six.moves.http_client.OK,
salt.ext.six.moves.http_client.ACCEPTED,
salt.ext.six.moves.http_client.CREATED,
salt.ext.six.moves.http_client.NO_CONTENT
]


Expand Down
2 changes: 1 addition & 1 deletion salt/cloud/clouds/libcloud_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
SaltCloudExecutionTimeout,
SaltCloudExecutionFailure
)
import salt.utils.six as six
import salt.ext.six as six

try:
from salt.cloud.libcloudfuncs import * # pylint: disable=W0614,W0401
Expand Down
2 changes: 1 addition & 1 deletion salt/cloud/clouds/nova.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

# Import generic libcloud functions
from salt.cloud.libcloudfuncs import * # pylint: disable=W0614,W0401
import salt.utils.six as six
import salt.ext.six as six
try:
from salt.utils.openstack import nova
HAS_NOVA = True
Expand Down
4 changes: 2 additions & 2 deletions salt/cloud/clouds/opennebula.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

# Attempt to import xmlrpclib and lxml
try:
import salt.utils.six.moves.xmlrpc_client # pylint: disable=E0611
import salt.ext.six.moves.xmlrpc_client # pylint: disable=E0611
from lxml import etree
HAS_XMLLIBS = True
except ImportError:
Expand Down Expand Up @@ -79,7 +79,7 @@ def _get_xml_rpc():
password = config.get_cloud_config_value(
'password', get_configured_provider(), __opts__
)
server = salt.utils.six.moves.xmlrpc_client.ServerProxy(xml_rpc)
server = salt.ext.six.moves.xmlrpc_client.ServerProxy(xml_rpc)

return server, user, password

Expand Down
6 changes: 3 additions & 3 deletions salt/cloud/libcloudfuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# Import python libs
import os
import logging
from salt.utils.six import string_types
import salt.utils.six as six
from salt.utils.six.moves import zip
from salt.ext.six import string_types
import salt.ext.six as six
from salt.ext.six.moves import zip


# pylint: disable=W0611
Expand Down
4 changes: 2 additions & 2 deletions salt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import codecs
# import third party libs
import yaml
import salt.utils.six as six
import salt.ext.six as six
try:
yaml.Loader = yaml.CLoader
yaml.Dumper = yaml.CDumper
Expand All @@ -32,7 +32,7 @@
import salt.utils.xdg
import salt.exceptions
from salt._compat import urlparse
from salt.utils.six import string_types
from salt.ext.six import string_types

import sys

Expand Down
2 changes: 1 addition & 1 deletion salt/crypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import logging
import traceback
import binascii
from salt.utils.six.moves import zip
from salt.ext.six.moves import zip

# Import third party libs
try:
Expand Down
2 changes: 1 addition & 1 deletion salt/daemons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Import Salt Libs
from salt.utils.odict import OrderedDict
import salt.utils.six as six
import salt.ext.six as six

log = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions salt/daemons/flo/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import itertools
from collections import deque
import random
import salt.utils.six as six
from salt.utils.six.moves import range
import salt.ext.six as six
from salt.ext.six.moves import range

# Import salt libs
import salt.daemons.masterapi
Expand Down
2 changes: 1 addition & 1 deletion salt/daemons/flo/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import os
import multiprocessing
import logging
from salt.utils.six.moves import range
from salt.ext.six.moves import range

# Import salt libs
import salt.daemons.masterapi
Expand Down
2 changes: 1 addition & 1 deletion salt/daemons/test/test_multimaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# pylint: skip-file
# pylint: disable=C0103
import sys
from salt.utils.six.moves import map
from salt.ext.six.moves import map
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
Expand Down
2 changes: 1 addition & 1 deletion salt/daemons/test/test_raetkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# pylint: skip-file
# pylint: disable=C0103
import sys
from salt.utils.six.moves import map
from salt.ext.six.moves import map
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion salt/fileserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Import salt libs
import salt.loader
import salt.utils
import salt.utils.six as six
import salt.ext.six as six

log = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions salt/fileserver/gitfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
import shutil
import subprocess
from datetime import datetime
from salt.utils.six import text_type as _text_type
from salt.ext.six import text_type as _text_type

VALID_PROVIDERS = ('gitpython', 'pygit2', 'dulwich')
PER_REMOTE_PARAMS = ('base', 'mountpoint', 'root')
Expand Down Expand Up @@ -90,7 +90,7 @@
# Import salt libs
import salt.utils
import salt.fileserver
from salt.utils.six import string_types
from salt.ext.six import string_types
from salt.exceptions import SaltException
from salt.utils.event import tagify

Expand Down
4 changes: 2 additions & 2 deletions salt/fileserver/hgfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import os
import shutil
from datetime import datetime
from salt.utils.six import text_type as _text_type
from salt.ext.six import text_type as _text_type

VALID_BRANCH_METHODS = ('branches', 'bookmarks', 'mixed')
PER_REMOTE_PARAMS = ('base', 'branch_method', 'mountpoint', 'root')
Expand All @@ -51,7 +51,7 @@
# Import salt libs
import salt.utils
import salt.fileserver
from salt.utils.six import string_types
from salt.ext.six import string_types
from salt.utils.event import tagify

log = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion salt/fileserver/roots.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import salt.fileserver
import salt.utils
from salt.utils.event import tagify
import salt.utils.six as six
import salt.ext.six as six

log = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions salt/fileserver/s3fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
import salt.modules
import salt.utils
import salt.utils.s3 as s3
import salt.utils.six as six
from salt.utils.six.moves import filter
import salt.ext.six as six
from salt.ext.six.moves import filter

log = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions salt/fileserver/svnfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import os
import shutil
from datetime import datetime
from salt.utils.six import text_type as _text_type
from salt.ext.six import text_type as _text_type

PER_REMOTE_PARAMS = ('mountpoint', 'root', 'trunk', 'branches', 'tags')

Expand All @@ -47,7 +47,7 @@
# Import salt libs
import salt.utils
import salt.fileserver
from salt.utils.six import string_types
from salt.ext.six import string_types
from salt.utils.event import tagify

log = logging.getLogger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions salt/grains/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
# Extend the default list of supported distros. This will be used for the
# /etc/DISTRO-release checking that is part of platform.linux_distribution()
from platform import _supported_dists
import salt.utils.six as six
import salt.ext.six as six
_supported_dists += ('arch', 'mageia', 'meego', 'vmware', 'bluewhite64',
'slamd64', 'ovs', 'system', 'mint', 'oracle')

# Import salt libs
import salt.log
import salt.utils
import salt.utils.network
from salt.utils.six import string_types
from salt.ext.six import string_types

# Solve the Chicken and egg problem where grains need to run before any
# of the modules are loaded and are generally available for any usage.
Expand Down
Loading

0 comments on commit d0ba57f

Please sign in to comment.