Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrErohin committed Nov 18, 2024
1 parent 3998ec6 commit 0beaeb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tplinkrouterc6u/client/c5400x.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def set_led(self, enable: bool) -> None:
if current_state != enable:
self.request('admin/ledgeneral?form=setting&operation=write', 'operation=write')

def get_led(self) -> bool:
def get_led(self) -> bool | None:

data = self.request('admin/ledgeneral?form=setting&operation=read', 'operation=read')
led_status = data.get('enable') if 'enable' in data else None
Expand Down
6 changes: 3 additions & 3 deletions tplinkrouterc6u/client/mr.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ def get_sms(self) -> [SMS]:
messages.append(
SMS(
i, item['from'], item['content'], datetime.fromisoformat(item['receivedTime']),
True if item['unread'] == '1' else False
item['unread'] == '1'
)
)
i += 1
Expand Down Expand Up @@ -691,8 +691,8 @@ def get_vpn_status(self) -> VPNStatus:
]
_, values = self.req_act(acts)

status.openvpn_enable = True if values['0']['enable'] == '1' else False
status.pptpvpn_enable = True if values['1']['enable'] == '1' else False
status.openvpn_enable = values['0']['enable'] == '1'
status.pptpvpn_enable = values['1']['enable'] == '1'

for item in values['2']:
if item['connAct'] == '1':
Expand Down

0 comments on commit 0beaeb7

Please sign in to comment.