Skip to content
Snippets Groups Projects
Commit 5ecb1c3c authored by Evan Edmond's avatar Evan Edmond
Browse files

elif not if

parent 30de770f
No related branches found
No related tags found
No related merge requests found
...@@ -1091,8 +1091,8 @@ class Image(Nifti): ...@@ -1091,8 +1091,8 @@ class Image(Nifti):
nibImage = nib.load(image, **kwargs) nibImage = nib.load(image, **kwargs)
dataSource = image dataSource = image
saved = True saved = True
# The image parameter may be the name of an image file # The image parameter may be a Path object pointing to an image file
if isinstance(image, Path): elif isinstance(image, Path):
nibImage = nib.load(image, **kwargs) nibImage = nib.load(image, **kwargs)
dataSource = str(image) dataSource = str(image)
saved = True saved = True
...@@ -1148,7 +1148,7 @@ class Image(Nifti): ...@@ -1148,7 +1148,7 @@ class Image(Nifti):
# from disk, use the file name. # from disk, use the file name.
if isinstance(image, six.string_types): if isinstance(image, six.string_types):
name = removeExt(op.basename(image)) name = removeExt(op.basename(image))
if isinstance(image, Path): elif isinstance(image, Path):
name = image.name name = image.name
# Or the image was created from a numpy array # Or the image was created from a numpy array
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment