buildframework/helium/tools/preparation/synergy/ccmgetinput.ant.xml
changeset 645 b8d81fa19e7d
parent 628 7c4a911dc066
--- 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)
                 </hlm:python>
             </try>
             <finally>
@@ -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)
                 </hlm:python>
             </try>
             <finally>