Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
284a916f
Commit
284a916f
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: emit warning when dupe image files detected
parent
594606d4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/data/image.py
+15
-6
15 additions, 6 deletions
fsl/data/image.py
with
15 additions
and
6 deletions
fsl/data/image.py
+
15
−
6
View file @
284a916f
...
@@ -1443,12 +1443,21 @@ def addExt(prefix, mustExist=True, unambiguous=True):
...
@@ -1443,12 +1443,21 @@ def addExt(prefix, mustExist=True, unambiguous=True):
"""
Adds a file extension to the given file ``prefix``. See
"""
Adds a file extension to the given file ``prefix``. See
:func:`~fsl.utils.path.addExt`.
:func:`~fsl.utils.path.addExt`.
"""
"""
return
fslpath
.
addExt
(
prefix
,
try
:
allowedExts
=
ALLOWED_EXTENSIONS
,
return
fslpath
.
addExt
(
prefix
,
mustExist
=
mustExist
,
allowedExts
=
ALLOWED_EXTENSIONS
,
defaultExt
=
defaultExt
(),
mustExist
=
mustExist
,
fileGroups
=
FILE_GROUPS
,
defaultExt
=
defaultExt
(),
unambiguous
=
unambiguous
)
fileGroups
=
FILE_GROUPS
,
unambiguous
=
unambiguous
)
except
fslpath
.
PathError
as
e
:
# hacky: if more than one file with
# the prefix exists, we emit a
# warning, because in most cases
# this is a bad thing.
if
str
(
e
).
startswith
(
'
More than
'
):
log
.
warning
(
e
)
raise
e
def
splitExt
(
filename
):
def
splitExt
(
filename
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment