From: Anthony Molinaro Date: Wed, 8 Apr 2020 05:40:30 +0000 (-0700) Subject: use more succinct name for arg X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=9c1b8b2579b4c134ed97944e7e7e51ac31df5006;p=stevenblack-hosts.git use more succinct name for arg --- diff --git a/testUpdateHostsFile.py b/testUpdateHostsFile.py index 8de506dae..3326b9e29 100644 --- a/testUpdateHostsFile.py +++ b/testUpdateHostsFile.py @@ -1268,16 +1268,6 @@ class TestFlushDnsCache(BaseStdout): ]: self.assertIn(expected, output) - -def mock_path_join_robust(*args): - # We want to hard-code the backup hosts filename - # instead of parametrizing based on current time. - if len(args) == 2 and args[1].startswith("hosts-"): - return os.path.join(args[0], "hosts-new") - else: - return os.path.join(*args) - - class TestRemoveOldHostsFile(BaseMockDir): def setUp(self): super(TestRemoveOldHostsFile, self).setUp() diff --git a/updateHostsFile.py b/updateHostsFile.py index fc24aace3..99b914f37 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -148,12 +148,12 @@ def main(): help="Skip static localhost entries " "in the final hosts file.", ) parser.add_argument( - "--skip-readme-data-update", - "-d", - dest="skipreadmedataupdate", - default=False, - action="store_true", - help="Skip update of readme data", + "--genreadmedata", + "-g", + dest="genreadmedata", + default=True, + action="store_false", + help="Skip generation of readmeData.json", ) parser.add_argument( "--output", @@ -285,7 +285,7 @@ def main(): ) final_file.close() - if not settings["skipreadmedataupdate"]: + if settings["genreadmedata"]: update_readme_data( settings["readmedatafilename"], extensions=extensions,