Skip to content

Conversation

@henry54809
Copy link

Added ability for configuring auto reboot using API v3 of 2017 page 82. Tested with IP2M-841B. I want this ability so I can write a script to continuously configure the device's reboot time to be X mins in the future. This is for cases where the device's networking crashes between now and X mins in the future , it can immediately reboot and come back online.

return ret.content.decode('utf-8')

def __set_config(self, *argv):
config_strs = "&".join(map(lambda pair: str(pair[0]) + "=" + str(pair[1]), argv))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (89 > 79 characters)

_KEEPALIVE_OPTS = HTTPConnection.default_socket_options + list(filter(lambda option: option[1], [
(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, KEEPALIVE_IDLE),
(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE if hasattr(socket, "TCP_KEEPIDLE") else None, KEEPALIVE_IDLE), # TCP_KEEPIDLE doesn't exist for Mac

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least two spaces before inline comment
line too long (144 > 79 characters)

_LOGGER = logging.getLogger(__name__)

_KEEPALIVE_OPTS = HTTPConnection.default_socket_options + [
_KEEPALIVE_OPTS = HTTPConnection.default_socket_options + list(filter(lambda option: option[1], [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Black would make changes.
line too long (97 > 79 characters)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 31.63% when pulling acd601b on henry54809:master into 3c6242f on tchellomello:master.

Copy link
Owner

@tchellomello tchellomello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henry54809 sorry for the long delay in reviewing this. I'm back on looking at this project more closely.
Could you re-work your PR so we can get this merged? Basically lint issues and re-testing it against the latest master branch so we can validate the change? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants