diff -r 27cf35f95864 -r b8d81fa19e7d buildframework/helium/tools/preparation/synergy/ccmgetinput.ant.xml --- a/buildframework/helium/tools/preparation/synergy/ccmgetinput.ant.xml Wed Sep 29 17:48:06 2010 +0100 +++ b/buildframework/helium/tools/preparation/synergy/ccmgetinput.ant.xml Sun Oct 10 15:22:15 2010 +0300 @@ -76,26 +76,15 @@ # enabling logging logging.basicConfig(level=logging.INFO) -builder = None +configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r')) +configSet = configBuilder.getConfiguration() +password = ant.get_property(r'${ccm.user.password}') +builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}')) try: - configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r')) - configSet = configBuilder.getConfiguration() - password = ant.get_property(r'${ccm.user.password}') - builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}')) builder.check() builder.get_content() +finally: builder.close() -except Exception, e: - print "ERROR: error found during preparation phase:" - for l in traceback.format_exc().splitlines(False): - print "ERROR: %s" % l - print "ERROR: this is a critical error, build will fail now:" - for l in str(e).splitlines(False): - print "ERROR: %s" % l - if builder != None: - builder.close() - sys.exit(-1) -sys.exit(0) @@ -130,25 +119,14 @@ # enabling logging logging.basicConfig(level=logging.INFO) -builder = None +configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r')) +configSet = configBuilder.getConfiguration() +password = ant.get_property(r'${ccm.user.password}') +builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}')) try: - configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r')) - configSet = configBuilder.getConfiguration() - password = ant.get_property(r'${ccm.user.password}') - builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}')) builder.cleanup() +finally: builder.close() -except Exception, e: - print "ERROR: error found during preparation phase:" - for l in traceback.format_exc().splitlines(False): - print "ERROR: %s" % l - print "ERROR: this is a critical error, build will fail now:" - for l in str(e).splitlines(False): - print "ERROR: %s" % l - if builder != None: - builder.close() - sys.exit(-1) -sys.exit(0)