From f8f6ec0f787cd0f37609452b83f9cdd96ccb6362 Mon Sep 17 00:00:00 2001 From: mago960806 Date: Fri, 26 Jul 2024 09:49:42 +0800 Subject: [PATCH] Fix `import_file` missing comment issue --- python_hosts/hosts.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python_hosts/hosts.py b/python_hosts/hosts.py index bbfa507..a5b7a49 100755 --- a/python_hosts/hosts.py +++ b/python_hosts/hosts.py @@ -368,7 +368,6 @@ def import_file(self, import_file_path=None): if (not stripped_entry) or (stripped_entry.startswith('#')): skipped += 1 else: - line = line.partition('#')[0] line = line.rstrip() import_entry = HostsEntry.str_to_hostentry(line) if import_entry: