diff options
| -rw-r--r-- | scripts/boot.py | 15 | 
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/boot.py b/scripts/boot.py index dd40b35..7ae30a9 100644 --- a/scripts/boot.py +++ b/scripts/boot.py @@ -26,12 +26,17 @@ def boot(config, to_database = True):  			f.write(line)  	# Let user script parse double value -	out = utils.callsubprocess('parse_command', conf.parse_command, -			conf.parse_output, True) -	value = float(out[0]) + +	value = None +	try: +		out = utils.callsubprocess('parse_command', conf.parse_command, +				conf.parse_output, True) +		value = float(out[0]) +	except Exception as e: +		print("W: parse exception: " + e.__str__())  	if to_database: -		dtb = database.database() -		dtb.add_measure(config.cfile, config.id, value) +			dtb = database.database() +			dtb.add_measure(config.cfile, config.id, value)  	return config.cfile  | 
