use more succinct name for arg
authorAnthony Molinaro <redacted>
Wed, 8 Apr 2020 05:40:30 +0000 (22:40 -0700)
committerAnthony Molinaro <redacted>
Wed, 8 Apr 2020 05:40:30 +0000 (22:40 -0700)
testUpdateHostsFile.py
updateHostsFile.py

index 8de506daea7edc83d2c08095d9b2551c54af4a76..3326b9e29801570c5d82f506a6defac92ca6a76a 100644 (file)
@@ -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()
index fc24aace34a06d8a07d0a567dcfcc361b8d6beb3..99b914f379ddda0e45ef5b36b48847b0bb23fa31 100644 (file)
@@ -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,
git clone https://git.99rst.org/PROJECT