mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #39581 from rallytime/fix-lint-develop
[develop] Fix some pylint errors that snuck into develop
This commit is contained in:
commit
2b5caa3c35
@ -2481,6 +2481,7 @@ def wait_for_instance(
|
||||
|
||||
return vm_
|
||||
|
||||
|
||||
def _validate_key_path_and_mode(key_filename):
|
||||
if key_filename is None:
|
||||
raise SaltCloudSystemExit(
|
||||
@ -2505,6 +2506,7 @@ def _validate_key_path_and_mode(key_filename):
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def create(vm_=None, call=None):
|
||||
'''
|
||||
Create a single VM from a data dict
|
||||
|
@ -226,8 +226,8 @@ class Serial(object):
|
||||
for key, value in six.iteritems(obj.copy()):
|
||||
encodedkey = datetime_encoder(key)
|
||||
if key != encodedkey:
|
||||
del obj[key]
|
||||
key = encodedkey
|
||||
del obj[key]
|
||||
key = encodedkey
|
||||
obj[key] = datetime_encoder(value)
|
||||
return dict(obj)
|
||||
elif isinstance(obj, (list, tuple)):
|
||||
|
@ -141,10 +141,10 @@ import os
|
||||
import salt.utils
|
||||
import salt.utils.odict as odict
|
||||
import salt.utils.dictupdate as dictupdate
|
||||
|
||||
# Import 3rd party libs
|
||||
import salt.ext.six as six
|
||||
from salt.ext.six.moves import range # pylint: disable=import-error,redefined-builtin
|
||||
|
||||
# Import 3rd party libs
|
||||
try:
|
||||
from salt._compat import ElementTree as ET
|
||||
HAS_ELEMENT_TREE = True
|
||||
|
@ -11,11 +11,12 @@ from salt.exceptions import SaltCloudSystemExit
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase, skipIf
|
||||
from salttesting.mock import MagicMock, NO_MOCK, NO_MOCK_REASON, patch
|
||||
from salttesting.mock import NO_MOCK, NO_MOCK_REASON
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../../')
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||
class EC2TestCase(TestCase):
|
||||
'''
|
||||
@ -39,6 +40,7 @@ class EC2TestCase(TestCase):
|
||||
ec2._validate_key_path_and_mode,
|
||||
key_file)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from unit import run_tests
|
||||
from integration import run_tests
|
||||
run_tests(EC2TestCase, needs_daemon=False)
|
||||
|
Loading…
Reference in New Issue
Block a user