diff --git a/pytplot/importers/cdf_to_tplot.py b/pytplot/importers/cdf_to_tplot.py index 38b71b5..4d7b1ee 100644 --- a/pytplot/importers/cdf_to_tplot.py +++ b/pytplot/importers/cdf_to_tplot.py @@ -95,6 +95,12 @@ def cdf_to_tplot(filenames, mastercdf=None, varformat=None, exclude_format=None, new_cdflib = False logging.debug("Using old version of cdflib (%s)", cdflib.__version__) + if prefix is None: + prefix = '' + + if suffix is None: + suffix = '' + if not isinstance(varnames, list): varnames = [varnames] diff --git a/pytplot/importers/netcdf_to_tplot.py b/pytplot/importers/netcdf_to_tplot.py index 6e22923..f789f9e 100644 --- a/pytplot/importers/netcdf_to_tplot.py +++ b/pytplot/importers/netcdf_to_tplot.py @@ -86,6 +86,11 @@ def netcdf_to_tplot( stored_variables = [] + if prefix is None: + prefix = '' + if suffix is None: + suffix = '' + if isinstance(filenames, str): filenames = [filenames] elif isinstance(filenames, list): diff --git a/pytplot/importers/sts_to_tplot.py b/pytplot/importers/sts_to_tplot.py index 00ebf2a..f0de86f 100644 --- a/pytplot/importers/sts_to_tplot.py +++ b/pytplot/importers/sts_to_tplot.py @@ -40,6 +40,11 @@ def sts_to_tplot(sts_file=None, read_only=False, prefix='', suffix='', merge=Tru sts_dict = {} stored_variables = [] + if prefix is None: + prefix = '' + if suffix is None: + suffix = '' + # Code assumes a list of STS files if isinstance(sts_file, str): sts_file = [sts_file]