-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability for configuring auto reboot. #150
base: master
Are you sure you want to change the base?
Conversation
@@ -50,6 +51,14 @@ def __get_config(self, config_name): | |||
) | |||
return ret.content.decode('utf-8') | |||
|
|||
def __set_config(self, *argv): | |||
config_strs = "&".join(map(lambda pair: str(pair[0]) + "=" + str(pair[1]), argv)) |
There was a problem hiding this comment.
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)
(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 |
There was a problem hiding this comment.
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)
@@ -48,12 +48,12 @@ | |||
|
|||
_LOGGER = logging.getLogger(__name__) | |||
|
|||
_KEEPALIVE_OPTS = HTTPConnection.default_socket_options + [ | |||
_KEEPALIVE_OPTS = HTTPConnection.default_socket_options + list(filter(lambda option: option[1], [ |
There was a problem hiding this comment.
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)
There was a problem hiding this 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
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.