We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1855eb commit 9d42d70Copy full SHA for 9d42d70
src/lisflood/hydrological_modules/__init__.py
@@ -41,9 +41,11 @@ def is_path(v):
41
return False
42
path_no_ext, current_ext = os.path.splitext(v)
43
v_alt = '{}.{}'.format(path_no_ext, 'nc' if current_ext in ('.map', '') else 'map')
44
+ v_alt2 = v if v.lower().endswith('.nc') else v + '.nc'
45
a = (os.path.exists(v) and os.path.isfile(v)) or os.access(v, os.W_OK)
46
b = (os.path.exists(v_alt) and os.path.isfile(v_alt)) or os.access(v_alt, os.W_OK)
- return a or b
47
+ c = (os.path.exists(v_alt2) and os.path.isfile(v_alt2)) or os.access(v_alt2, os.W_OK)
48
+ return a or b or c
49
50
51
class HydroModule(object):
0 commit comments