mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-07-01 02:36:52 +00:00
use more succinct name for arg
This commit is contained in:
@@ -1268,16 +1268,6 @@ class TestFlushDnsCache(BaseStdout):
|
|||||||
]:
|
]:
|
||||||
self.assertIn(expected, output)
|
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):
|
class TestRemoveOldHostsFile(BaseMockDir):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestRemoveOldHostsFile, self).setUp()
|
super(TestRemoveOldHostsFile, self).setUp()
|
||||||
|
|||||||
@@ -148,12 +148,12 @@ def main():
|
|||||||
help="Skip static localhost entries " "in the final hosts file.",
|
help="Skip static localhost entries " "in the final hosts file.",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--skip-readme-data-update",
|
"--genreadmedata",
|
||||||
"-d",
|
"-g",
|
||||||
dest="skipreadmedataupdate",
|
dest="genreadmedata",
|
||||||
default=False,
|
default=True,
|
||||||
action="store_true",
|
action="store_false",
|
||||||
help="Skip update of readme data",
|
help="Skip generation of readmeData.json",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--output",
|
"--output",
|
||||||
@@ -285,7 +285,7 @@ def main():
|
|||||||
)
|
)
|
||||||
final_file.close()
|
final_file.close()
|
||||||
|
|
||||||
if not settings["skipreadmedataupdate"]:
|
if settings["genreadmedata"]:
|
||||||
update_readme_data(
|
update_readme_data(
|
||||||
settings["readmedatafilename"],
|
settings["readmedatafilename"],
|
||||||
extensions=extensions,
|
extensions=extensions,
|
||||||
|
|||||||
Reference in New Issue
Block a user