From af394388ff0985b4b407ed4faeb105395655d102 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 26 Jan 2010 15:51:59 -0500 Subject: if datasource is already defined do not re-load it (even from cache) --- ec2init/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ec2init') 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 -- cgit v1.2.3