From 506892f878959a026acdd5d4a124cdf38edeba28 Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Mon, 25 Feb 2019 17:32:02 +0100
Subject: [PATCH] Make "NONE" checks case-insensitive
---
src/imcflibs/imagej/shading.py | 2 +-
src/imcflibs/pathtools.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/imcflibs/imagej/shading.py b/src/imcflibs/imagej/shading.py
index 18f66ac..1599087 100644
--- a/src/imcflibs/imagej/shading.py
+++ b/src/imcflibs/imagej/shading.py
@@ -121,7 +121,7 @@ def process_folder(path, suffix, outpath, model_file, fmt):
fmt : str
The file format suffix for storing the results.
"""
- if model_file in ["-", "NONE"]:
+ if model_file.upper() in ["-", "NONE"]:
model = None
else:
model = ij.IJ.openImage(model_file)
diff --git a/src/imcflibs/pathtools.py b/src/imcflibs/pathtools.py
index 3969f48..a351e51 100644
--- a/src/imcflibs/pathtools.py
+++ b/src/imcflibs/pathtools.py
@@ -171,7 +171,7 @@ def derive_out_dir(in_dir, out_dir):
str
The full path to the directory to be used for output and temp files.
"""
- if out_dir in ["-", "NONE"]:
+ if out_dir.upper() in ["-", "NONE"]:
out_dir = in_dir
log.info("No output directory given, using input dir [%s].", out_dir)
else:
--
GitLab