Skip to content

Commit

Permalink
Merge pull request #434 from ESMCI/santos/fix-recursion
Browse files Browse the repository at this point in the history
Prevent infinite recursion in `Case`.
  • Loading branch information
jedwards4b authored Aug 20, 2016
2 parents 50f145b + aa6a8a1 commit 9099b4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/python/CIME/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ def get_resolved_value(self, item, recurse=0):
else:
item = self.get_resolved_value(item,recurse=recurse+1)

if(recurse >= recurse_limit):
if recurse >= 2*recurse_limit:
logging.warning("Not able to fully resolve item '%s'" % item)
elif recurse >= recurse_limit:
#try env_batch first
env_batch = self.get_env("batch")
item = env_batch.get_resolved_value(item)
Expand Down

0 comments on commit 9099b4e

Please sign in to comment.