diff options
| author | Todd Willey <todd@rubidine.com> | 2010-07-15 00:21:17 -0400 |
|---|---|---|
| committer | Todd Willey <todd@rubidine.com> | 2010-07-15 00:21:17 -0400 |
| commit | fbf23a4f5f7d10429f26b2f43d2d203a39712acd (patch) | |
| tree | e5ed888998e97d7d16bfc9d80210609a4e3d13fb /nova/cloudpipe | |
| parent | 9ef046e77e18806264c92e90b20dc84fb2a9d369 (diff) | |
| parent | 892ca58c0642db19e57a89d7a2ae5466971249cf (diff) | |
fix merge errors
Diffstat (limited to 'nova/cloudpipe')
| -rw-r--r-- | nova/cloudpipe/pipelib.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/cloudpipe/pipelib.py b/nova/cloudpipe/pipelib.py index 09da71c64..5f6ccf82e 100644 --- a/nova/cloudpipe/pipelib.py +++ b/nova/cloudpipe/pipelib.py @@ -76,12 +76,13 @@ class CloudPipe(object): zippy.close() def setup_keypair(self, user_id, project_id): - key_name = '%s-key' % project_id + key_name = '%s%s' % (project_id, FLAGS.vpn_key_suffix) try: private_key, fingerprint = self.manager.generate_key_pair(user_id, key_name) try: key_dir = os.path.join(FLAGS.keys_path, user_id) - os.makedirs(key_dir) + if not os.path.exists(key_dir): + os.makedirs(key_dir) with open(os.path.join(key_dir, '%s.pem' % key_name),'w') as f: f.write(private_key) except: |
