Cleanup pylint unnecessary-pass warnings

This commit cleans up pylint error:
  W0107 unnecessary-pass

Python rules dictate that a pass statement is only needed
if it is the only code in a particular block.

These changes have no runtime impact on the code.

Story: 2004515
Task: 28249
Change-Id: Ib805496c1123708cb67af82458f0b354a7b8e279
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
Al Bailey 2018-12-03 15:15:55 -06:00
parent 56f6ec6274
commit b4579b875b
9 changed files with 2 additions and 11 deletions

View File

@ -222,7 +222,6 @@ def _thread_main(thread_name, progress_marker, debug_config, thread_worker,
except KeyboardInterrupt: except KeyboardInterrupt:
print("Keyboard Interrupt received.") print("Keyboard Interrupt received.")
pass
except Exception as e: except Exception as e:
DLOG.exception("%s" % e) DLOG.exception("%s" % e)

View File

@ -716,7 +716,6 @@ def process_main():
except KeyboardInterrupt: except KeyboardInterrupt:
print("Keyboard Interrupt received.") print("Keyboard Interrupt received.")
pass
except Exception as e: except Exception as e:
print("Exception: %s" % e) print("Exception: %s" % e)

View File

@ -166,7 +166,6 @@ def process_main():
except KeyboardInterrupt: except KeyboardInterrupt:
print("Keyboard Interrupt received.") print("Keyboard Interrupt received.")
pass
except Exception as e: except Exception as e:
DLOG.exception("%s" % e) DLOG.exception("%s" % e)

View File

@ -158,7 +158,6 @@ def process_main():
except KeyboardInterrupt: except KeyboardInterrupt:
print("Keyboard Interrupt received.") print("Keyboard Interrupt received.")
pass
except Exception as e: except Exception as e:
print(e) print(e)

View File

@ -67,7 +67,6 @@ def process_main():
except KeyboardInterrupt: except KeyboardInterrupt:
print("Keyboard Interrupt received.") print("Keyboard Interrupt received.")
pass
except Exception as e: except Exception as e:
print(e) print(e)

View File

@ -112,7 +112,6 @@ def process_main():
except KeyboardInterrupt: except KeyboardInterrupt:
print("Keyboard Interrupt received.") print("Keyboard Interrupt received.")
pass
except Exception as e: except Exception as e:
print(e) print(e)

View File

@ -26,7 +26,6 @@ load-plugins=
# can either give multiple identifier separated by comma (,) or put this option # can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where # multiple time (only on the command line, not in the configuration file where
# it should appear only once). # it should appear only once).
# W0107 unnecessary-pass
# W0120 useless-else-on-loop # W0120 useless-else-on-loop
# W0125 using-constant-test # W0125 using-constant-test
# W0212 protected-access var starting with _ used outside class or descendant # W0212 protected-access var starting with _ used outside class or descendant
@ -46,7 +45,7 @@ load-plugins=
# W0622 redefined-builtin # W0622 redefined-builtin
# W0703 broad except warning # W0703 broad except warning
# W1401 anomalous-backslash-in-string # W1401 anomalous-backslash-in-string
disable=C, R, W0107, W0120, W0125, W0212, W0221, W0223, W0231, W0235, W0311, disable=C, R, W0120, W0125, W0212, W0221, W0223, W0231, W0235, W0311,
W0401, W0403, W0404, W0511, W0603, W0612, W0613, W0621, W0622, W0703, W1401 W0401, W0403, W0404, W0511, W0603, W0612, W0613, W0621, W0622, W0703, W1401

View File

@ -91,7 +91,6 @@ def main():
except KeyboardInterrupt: except KeyboardInterrupt:
LOG.info("Keyboard Interrupt received.") LOG.info("Keyboard Interrupt received.")
pass
except Exception as e: except Exception as e:
LOG.exception(e) LOG.exception(e)

View File

@ -28,14 +28,13 @@ load-plugins=
# it should appear only once). # it should appear only once).
# E1101 no-member # E1101 no-member
# E1121: Too many positional arguments for function call # E1121: Too many positional arguments for function call
# W0107 unnecessary-pass
# W0404 reimported # W0404 reimported
# W0601 Global variable %r undefined at the module level # W0601 Global variable %r undefined at the module level
# W0603 Using the global statement warning # W0603 Using the global statement warning
# W0613 Unused argument warning # W0613 Unused argument warning
# W0621 Redefining name %r from outer scope # W0621 Redefining name %r from outer scope
# W0703 broad except warning # W0703 broad except warning
disable=C, R, E1101, E1121, W0107, W0404, W0601, W0603, W0613, W0621, W0703 disable=C, R, E1101, E1121, W0404, W0601, W0603, W0613, W0621, W0703
[REPORTS] [REPORTS]