From cd67b85533b4b133e8924e100bf9c794798dd6cc Mon Sep 17 00:00:00 2001
From: dave <dave@dtu.dk>
Date: Tue, 11 Oct 2016 11:38:33 +0200
Subject: [PATCH] prepost.Simulations: use warning instead of raising
 exception, also restore functionality of the deprecated function.

---
 wetb/prepost/Simulations.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py
index 2dadaca4..e12a6aa0 100755
--- a/wetb/prepost/Simulations.py
+++ b/wetb/prepost/Simulations.py
@@ -33,7 +33,7 @@ import pickle
 import re
 # what is actually the difference between warnings and logging.warn?
 # for which context is which better?
-#import warnings
+import warnings
 import logging
 from operator import itemgetter
 from time import time
@@ -5181,7 +5181,12 @@ class Cases(object):
         """
         msg = "force_lower_case_id is depricated and is integrated in "
         msg += "Cases.createcase() instead."
-        raise DeprecationWarning(msg)
+        warnings.warn(msg, DeprecationWarning)
+
+        tmp_cases = {}
+        for cname, case in self.cases.items():
+             tmp_cases[cname.lower()] = case.copy()
+        self.cases = tmp_cases
 
 
 class EnvelopeClass(object):
-- 
GitLab