diff options
author | Scott Moser <smoser@ubuntu.com> | 2010-01-26 15:51:59 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2010-01-26 15:51:59 -0500 |
commit | af394388ff0985b4b407ed4faeb105395655d102 (patch) | |
tree | a45dc21759a478dda2b901f8682192685e983fbf | |
parent | 930328be289ec7ab243b50360a73dab10f17844a (diff) | |
download | vyos-cloud-init-af394388ff0985b4b407ed4faeb105395655d102.tar.gz vyos-cloud-init-af394388ff0985b4b407ed4faeb105395655d102.zip |
if datasource is already defined do not re-load it (even from cache)
-rw-r--r-- | ec2init/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ec2init/__init__.py b/ec2init/__init__.py index cfd54e8d..f89839ab 100644 --- a/ec2init/__init__.py +++ b/ec2init/__init__.py @@ -47,6 +47,7 @@ class EC2Init: datasource_map = { "ec2" : DataSourceEc2.DataSourceEc2, } + datasource = None auto_order = [ 'ec2' ] cfg = None @@ -112,6 +113,8 @@ class EC2Init: pass def get_data_source(self): + if self.datasource is not None: return True + if self.restore_from_cache(): return True |