From 65eaf9c7d32ccfee81a486229909149a90d5f252 Mon Sep 17 00:00:00 2001 From: Claudio-Daniel Freire Date: Thu, 12 May 2011 15:13:15 +0200 Subject: [PATCH] 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) --- src/nepi/core/execute.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.47.0