From: Claudio-Daniel Freire <claudio-daniel.freire@inria.fr> Date: Thu, 12 May 2011 13:13:15 +0000 (+0200) Subject: Fix broken netref commit: do not consider them resolved if there's any exception... X-Git-Tag: nepi_v2~44 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=65eaf9c7d32ccfee81a486229909149a90d5f252;p=nepi.git Fix broken netref commit: do not consider them resolved if there's any exception, don't consider exceptions there as an error either. Premature resolution often results in KeyError exceptions (among possibly others) --- diff --git a/src/nepi/core/execute.py b/src/nepi/core/execute.py index 1167c211..ad5b8a6b 100644 --- a/src/nepi/core/execute.py +++ b/src/nepi/core/execute.py @@ -736,7 +736,11 @@ class ExperimentController(object): for (name, value) in data.get_attribute_data(guid): # Try to resolve create-time netrefs, if possible if isinstance(value, basestring) and ATTRIBUTE_PATTERN_BASE.search(value): - nuvalue = self.resolve_netref_value(value) + try: + nuvalue = self.resolve_netref_value(value) + except: + # Any trouble means we're not in shape to resolve the netref yet + nuvalue = None if nuvalue is not None: # Only if we succeed we remove the netref deferral entry value = nuvalue