Permalink
Browse files

Fixed 'tx_power' KeyError, introduced in 71b083e #37

  • Loading branch information...
nemesisdesign committed Feb 19, 2016
1 parent 007da6e commit 2c1e72ef0f4031a8d0388568b586e440101d615d
Showing with 3 additions and 4 deletions.
  1. +3 −2 netjsonconfig/backends/openwrt/renderers.py
  2. +0 −2 tests/openwrt/test_wireless.py
@@ -224,8 +224,9 @@ def _get_radios(self):
for radio in radios:
uci_radio = radio.copy()
# rename tx_power to txpower
uci_radio['txpower'] = radio['tx_power']
del uci_radio['tx_power']
if 'tx_power' in radio:
uci_radio['txpower'] = radio['tx_power']
del uci_radio['tx_power']
# rename driver to type
uci_radio['type'] = radio['driver']
del uci_radio['driver']
@@ -21,7 +21,6 @@ def test_radio(self):
"protocol": "802.11n",
"channel": 140,
"channel_width": 20,
"tx_power": 9,
"country": "en"
},
{
@@ -45,7 +44,6 @@ def test_radio(self):
option htmode 'HT20'
option hwmode '11a'
option phy 'phy0'
option txpower '9'
option type 'mac80211'
config wifi-device 'radio1'

0 comments on commit 2c1e72e

Please sign in to comment.