Commit 7846102a authored by Joanne Hugé's avatar Joanne Hugé

software/ors-amarisoft: set version to 0 if it is unknown

parent 91f8e718
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = b20044ea71c98ee6e4498c25e4e7f7a2 md5sum = 3919d261bdf366b7f7cc5149ab4c609d
[amarisoft-stats.jinja2.py] [amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py _update_hash_filename_ = amarisoft-stats.jinja2.py
......
...@@ -175,7 +175,8 @@ init = ...@@ -175,7 +175,8 @@ init =
return subprocess.check_output( return subprocess.check_output(
["sudo", "-n", "/opt/amarisoft/get-sdr-info", "-" + cmd] ["sudo", "-n", "/opt/amarisoft/get-sdr-info", "-" + cmd]
) )
options['version'] = float(get_sdr_info('v').decode()) version = get_sdr_info('v').decode()
options['version'] = float(version) if version != 'UNKNOWN' else 0
options['band'] = get_sdr_info('b').decode() options['band'] = get_sdr_info('b').decode()
options['tdd'] = get_sdr_info('t').decode() options['tdd'] = get_sdr_info('t').decode()
options['one-watt'] = bool(options['version'] >= 4) options['one-watt'] = bool(options['version'] >= 4)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment