etherlab/EthercatCFileGenerator.py
changeset 2121 11102245e1d4
parent 2117 accc4cbca8d3
child 2137 b65abacdbdf9
--- a/etherlab/EthercatCFileGenerator.py	Thu Apr 11 10:32:58 2013 +0200
+++ b/etherlab/EthercatCFileGenerator.py	Fri Apr 12 15:41:22 2013 +0900
@@ -26,7 +26,7 @@
 SLAVE_CONFIGURATION_TEMPLATE = """
     if (!(slave%(slave)d = ecrt_master_slave_config(master, %(alias)d, %(position)d, 0x%(vendor).8x, 0x%(product_code).8x))) {
         SLOGF(LOG_CRITICAL, "EtherCAT failed to get slave %(device_type)s configuration at alias %(alias)d and position %(position)d.");
-        return -1;
+        goto ecat_failed;
     }
 
     if (ecrt_slave_config_pdos(slave%(slave)d, EC_END, slave_%(slave)d_syncs)) {