Introduction of `Start xx` and `End xxx`
authorfunilrys <redacted>
Sat, 9 Jun 2018 09:35:48 +0000 (11:35 +0200)
committerfunilrys <redacted>
Sat, 9 Jun 2018 09:35:48 +0000 (11:35 +0200)
This patch fix #644

updateHostsFile.py

index 4f08e676d8546f79c3da4d4338b367c7d1737a7c..1a1600e2dac8edd4acc4fbed8589d23f677b5e70 100644 (file)
@@ -632,8 +632,12 @@ def create_initial_file():
     # spin the sources for the base file
     for source in recursive_glob(settings["datapath"],
                                  settings["hostfilename"]):
+
+        start = "# Start {}\n".format(os.path.basename(os.path.dirname(source)))
+        end = "# End {}\n".format(os.path.basename(os.path.dirname(source)))
+
         with open(source, "r") as curFile:
-            write_data(merge_file, curFile.read())
+            write_data(merge_file, start + curFile.read() + end)
 
     # spin the sources for extensions to the base file
     for source in settings["extensions"]:
git clone https://git.99rst.org/PROJECT