From 5cc3259f6d0d4b8bfb5f428a8e4de8589244dc3c Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 29 Dec 2012 22:03:42 +0000 Subject: [PATCH] Fix PyLint C0103 on `salt.utils.yaml`. Refs #1775. --- salt/utils/yaml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/utils/yaml.py b/salt/utils/yaml.py index 4ebbd343d6..c63e4ef18b 100644 --- a/salt/utils/yaml.py +++ b/salt/utils/yaml.py @@ -12,7 +12,7 @@ try: except Exception: pass -load = yaml.load +load = yaml.load # pylint: disable-msg=C0103 class DuplicateKeyWarning(RuntimeWarning): @@ -22,6 +22,7 @@ class DuplicateKeyWarning(RuntimeWarning): warnings.simplefilter('always', category=DuplicateKeyWarning) + # with code integrated form https://gist.github.com/844388 class CustomLoader(yaml.SafeLoader): ''' @@ -82,4 +83,3 @@ class CustomLoader(yaml.SafeLoader): and not node.value.startswith(('0b', '0x')): node.value = node.value.lstrip('0') return yaml.constructor.SafeConstructor.construct_scalar(self, node) -