[Git][NTPsec/ntpsec][master] Remove unneeded "pass" statements from python code

Eric S. Raymond gitlab at mg.gitlab.com
Thu Aug 9 23:23:15 UTC 2018


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
2a1bb98f by Matt Selsky at 2018-08-09T23:17:27Z
Remove unneeded "pass" statements from python code

Reported by Sonarqube's Sonarcloud.io project

- - - - -


4 changed files:

- ntpclients/ntpq.py
- ntpclients/ntpviz.py
- pylib/statfiles.py
- tests/pylib/test_packet.py


Changes:

=====================================
ntpclients/ntpq.py
=====================================
@@ -1375,7 +1375,6 @@ usage: mrulist [tag=value] [tag=value] [tag=value] [tag=value]
         except ntp.packet.ControlException as e:
             self.warn(e.message + "\n")
             return
-        pass
 
     def help_ifstats(self):
         self.say("""\


=====================================
ntpclients/ntpviz.py
=====================================
@@ -1552,7 +1552,6 @@ Python by ESR, concept and gnuplot code by Dan Drown.
         except ImportError:
             if 0 < args.debug_level:
                 sys.stderr.write("ntpviz: INFO: psutil not found\n")
-            pass
 
         # set nice()
         nice = os.nice(nice)


=====================================
pylib/statfiles.py
=====================================
@@ -164,7 +164,6 @@ class NTPStats:
         except IOError:  # pragma: no cover
             sys.stderr.write("ntpviz: WARNING: could not read %s\n"
                              % logpart)
-            pass
 
         return lines
 


=====================================
tests/pylib/test_packet.py
=====================================
@@ -591,7 +591,6 @@ class TestMisc(unittest.TestCase):
                              "'last': '0x00000200.00000000', "
                              "'first': '0x00000100.00000000', 'ct': 4, "
                              "'mv': None, 'rs': None>")
-            pass
         else:
             # Python 3.x < 3.6, dicts enumerate randomly
             # I can not test randomness of this type



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/2a1bb98fcbec59ef0642b63c29b61574757a548e

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/2a1bb98fcbec59ef0642b63c29b61574757a548e
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180809/a8545e1a/attachment-0001.html>


More information about the vc mailing list