From 291023283de57767fb63d5d570e99580bbc43a88 Mon Sep 17 00:00:00 2001 From: David Stoline Date: Mon, 22 Jul 2013 14:34:52 -0400 Subject: [PATCH] Don't clobber customizations when an update is made to config.py upstream. --- .gitignore | 1 + config.py => config.py.dist | 0 install.py | 5 +++++ 3 files changed, 6 insertions(+) rename config.py => config.py.dist (100%) diff --git a/.gitignore b/.gitignore index 25a014d8..59291234 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ powerline-shell.py *.py[co] +config.py diff --git a/config.py b/config.py.dist similarity index 100% rename from config.py rename to config.py.dist diff --git a/install.py b/install.py index 70f96f39..a152877d 100755 --- a/install.py +++ b/install.py @@ -16,6 +16,11 @@ def load_source(srcfile): return '' if __name__ == "__main__": + try: + with open('config.py'): pass + except IOError: + print 'Please copy config.py.dist to config.py and retry.' + exit(1) source = load_source(TEMPLATE_FILE) source += load_source(os.path.join(THEMES_DIR, config.THEME + '.py')) for segment in config.SEGMENTS: