Skip to content

Commit 39712cd

Browse files
committed
Warn EclFiles users about nonexisting DATA
1 parent a378f8e commit 39712cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ecl2df/eclfiles.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ def __init__(self, eclbase):
5858
# eclbase might be a a Posix path object
5959
eclbase = str(eclbase)
6060

61+
# Hint about possible wrong filenames:
62+
if ".DATA" in eclbase and not os.path.exists(eclbase):
63+
logger.warning("File %s does not exist", eclbase)
64+
# (this is not an error, because it is possible
65+
# to obtain summary without the DATA file being present)
66+
6167
# Strip .DATA or . at end of eclbase:
6268
eclbase = rreplace(".DATA", "", eclbase)
6369
eclbase = rreplace(".", "", eclbase)

0 commit comments

Comments
 (0)