Skip to content

Commit 6ebbb1a

Browse files
authored
Merge pull request #25 from DHI/filenotfounderror
FileNotFoundError is more specific than Exception
2 parents f35d4c5 + a752b7a commit 6ebbb1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mikecore/DfsFile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ def Open(self, filename, mode = DfsFileMode.Read, parameters=None):
707707
self.Close()
708708

709709
if (not os.path.isfile(filename)):
710-
raise Exception("File not found {}".format(filename))
710+
raise FileNotFoundError("File not found {}".format(filename))
711711

712712
# Check if trying to edit a read-only file.
713713
if ((mode == DfsFileMode.Edit or mode == DfsFileMode.Append)

0 commit comments

Comments
 (0)