Commit ea1b933e authored by Lu Xu's avatar Lu Xu 👀

fixup

parent 65125868
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 2735363970f6c5569431325c4738896f md5sum = 6007733e94a72cbee9a22344deafe18b
[amarisoft-stats.jinja2.py] [amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py _update_hash_filename_ = amarisoft-stats.jinja2.py
......
...@@ -126,12 +126,13 @@ init = ...@@ -126,12 +126,13 @@ 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)
options['ors-version'] = "{} {} {}".format( options['ors-version'] = "{} {} {}".format(
options['tdd'], options['tdd'],
options['band'], options['band'],
"2x1W" if options['one-watt'] else "2x0.5W", "2x1W" if options['one-watt'] else "2x0.5W",
) )
......
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