[bugfix] string transformation of None values

This commit is contained in:
Marcel Paffrath 2017-08-02 11:02:24 +02:00
parent a5a3087283
commit d5645cf979
2 changed files with 11 additions and 1 deletions

View File

@ -26,6 +26,7 @@ from pylot.core.util.dataprocessing import restitute_data, read_metadata, \
from pylot.core.util.structure import DATASTRUCTURE from pylot.core.util.structure import DATASTRUCTURE
from pylot.core.util.version import get_git_version as _getVersionString from pylot.core.util.version import get_git_version as _getVersionString
from pylot.core.util.event import Event from pylot.core.util.event import Event
from pylot.core.util.utils import real_None
__version__ = _getVersionString() __version__ = _getVersionString()
@ -56,6 +57,10 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, even
***********************************'''.format(version=_getVersionString()) ***********************************'''.format(version=_getVersionString())
print(splash) print(splash)
parameter = real_None(parameter)
inputfile = real_None(inputfile)
eventid = real_None(eventid)
locflag = 1 locflag = 1
if input_dict and isinstance(input_dict, dict): if input_dict and isinstance(input_dict, dict):
if 'parameter' in input_dict: if 'parameter' in input_dict:

View File

@ -181,6 +181,11 @@ def fnConstructor(s):
fn = '_' + fn fn = '_' + fn
return fn return fn
def real_None(value):
if value == 'None':
return None
else:
return value
def four_digits(year): def four_digits(year):
""" """