Skip to content

Commit

Permalink
Merge pull request #1270 from UV-CDAT/fix-cdms-exceptions
Browse files Browse the repository at this point in the history
Fixes more typos in raise statements
  • Loading branch information
doutriaux1 committed May 5, 2015
2 parents 77bcd01 + c32b6fe commit 6ea8a64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Packages/cdms2/Lib/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def setNetcdfDeflateFlag(value):
def setNetcdfDeflateLevelFlag(value):
""" Sets NetCDF deflate level flag value"""
if value not in [0,1,2,3,4,5,6,7,8,9]:
raise CDMSError, "Error NetCDF deflate_level flag must be an integer < 10"
raise CDMSError("Error NetCDF deflate_level flag must be an integer < 10")
Cdunif.CdunifSetNCFLAGS("deflate_level",value)

def getNetcdfClassicFlag():
Expand Down Expand Up @@ -245,14 +245,14 @@ def openDataset(uri,mode='r',template=None,dods=1,dpath=None, hostObj=None):
file = CdmsFile(uri,mode)
return file
except:
raise CDMSError("Error in DODS open of: ",uri)
raise CDMSError("Error in DODS open of: "+uri)
else:
try:
datanode = loadURI(uri)
return datanode
except:
datanode = loadURI(uri)
raise CDMSError("Error in loadURI of: ",uri)
raise CDMSError("Error in loadURI of: "+uri)

else:
raise SchemeNotSupported(scheme)
Expand Down

0 comments on commit 6ea8a64

Please sign in to comment.