Skip to content

Commit

Permalink
small fix for missing type info in jsonFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangWaltenberger committed Jul 31, 2024
1 parent f6856ed commit 3cf832e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions smodels/statistics/statsTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ def getComputerPyhf(self ):
for jsName in globalInfo.jsonFiles:
jsonSRs = []
for ir,region in enumerate ( globalInfo.jsonFiles[jsName] ):
if isinstance(region,dict) and not ("type" in region):
region["type"]="SR"
if isinstance(region,str):
region = { "smodels": region, "type": "SR" }
elif isinstance(region,dict) and not ("type" in region):
region["type"]="SR"
else:
elif not isinstance(region,dict):
raise SModelSError("The jsonFiles field should contain lists \
of strings or dictionaries \
(%s is not allowed)" %type(region))
Expand Down

0 comments on commit 3cf832e

Please sign in to comment.