diff options
author | Tibor Frank <tifrank@cisco.com> | 2016-12-15 10:52:33 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2016-12-16 08:35:32 +0100 |
commit | cf561a6e3d4c4fbd78ab6c9d0a9aa817bb3300fc (patch) | |
tree | 0b4d5d2dbda78223d77d76e237285396d42c868e /resources/libraries/python/VatExecutor.py | |
parent | 677ae40a2be6db9f49b19ada3c4299a8904f7784 (diff) |
Pylint fixes
- Fix PyLint errors
- Fix comments in touched python modules
Change-Id: I26db2d292a41969cf38b9b0bdd49c4fb15349102
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries/python/VatExecutor.py')
-rw-r--r-- | resources/libraries/python/VatExecutor.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/resources/libraries/python/VatExecutor.py b/resources/libraries/python/VatExecutor.py index 03b7321020..bbce83d1ad 100644 --- a/resources/libraries/python/VatExecutor.py +++ b/resources/libraries/python/VatExecutor.py @@ -30,7 +30,7 @@ def cleanup_vat_json_output(json_output): Clean up VAT JSON output from clutter like vat# prompts and such. :param json_output: Cluttered JSON output. - :return: Cleaned up output JSON string. + :returns: Cleaned up output JSON string. """ retval = json_output @@ -187,9 +187,8 @@ class VatTerminal(object): """ logger.debug("Executing command in VAT terminal: {}".format(cmd)) try: - out = self._ssh.interactive_terminal_exec_command(self._tty, - cmd, - self.__VAT_PROMPT) + out = self._ssh.interactive_terminal_exec_command(self._tty, cmd, + self.__VAT_PROMPT) except: self._exec_failure = True raise @@ -201,10 +200,10 @@ class VatTerminal(object): array_start = out.find('[') array_end = out.rfind(']') - if -1 == obj_start and -1 == array_start: + if obj_start == -1 and array_start == -1: raise RuntimeError("VAT: no JSON data.") - if obj_start < array_start or -1 == array_start: + if obj_start < array_start or array_start == -1: start = obj_start end = obj_end + 1 else: |