From e56b2fb73940ed2271c62c8c7c52dc7e778e1c55 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Tue, 11 Nov 2014 15:26:28 -0500 Subject: [PATCH] ensure ~/.aeromancer exists --- aeromancer/cli/app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aeromancer/cli/app.py b/aeromancer/cli/app.py index 4e7453a..d8720ee 100644 --- a/aeromancer/cli/app.py +++ b/aeromancer/cli/app.py @@ -50,6 +50,11 @@ class Aeromancer(App): return def initialize_app(self, argv): + # Make sure our application directory exists, so we have a + # place to put the database and any other configuration files. + self.app_dir = os.path.expanduser('~/.aeromancer') + if not os.path.exists(self.app_dir): + os.mkdir(self.app_dir) self.log.debug('updating database') migrations.run_migrations() self.engine = connect.connect()