X-Git-Url: http://git.grml.org/?p=grml-x.git;a=blobdiff_plain;f=grml-x;fp=grml-x;h=49d3f8e9332fed3b6dc08696146ea9699218ba77;hp=7323991435f3c864bbec1299b83b93c453e8e6de;hb=2289606cab6f70bd1e9808cfb91cc55a2bd1eaf5;hpb=db26b123e7a5734fa5536a7a0f96ae2d1738b703 diff --git a/grml-x b/grml-x index 7323991..49d3f8e 100755 --- a/grml-x +++ b/grml-x @@ -108,14 +108,14 @@ def which(program): return None -XORG_CONF_HEADER = "# Automatically generated by grml-x." +XORG_CONF_HEADER = "# Automatically generated by grml-x.\n" def check_old_xorg_conf(filename, overwrite): # True: no problem, we can create/overwrite the config file # False: pre-existing config file, and we are not to overwrite it if overwrite: return True if not os.path.exists(filename): return True try: - f = file(filename, 'r') + f = open(filename, 'r') lines = f.readlines() f.close() return (not XORG_CONF_HEADER in lines) @@ -205,7 +205,7 @@ def main(): if monitor or device or len(screen.data) > 0 or screen.subsect != '': try: f = tempfile.NamedTemporaryFile(mode='w+', delete=False) - f.write(XORG_CONF_HEADER + "\n") + f.write(XORG_CONF_HEADER) f.write("# DO NOT MODIFY, YOUR CHANGES WILL BE LOST - OR REMOVE ALL HEADER LINES\n") f.write("# See man xorg.conf or /etc/X11/xorg.conf.example for more\n") if monitor: f.write(str(monitor))