Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added ability for configuring auto reboot.#150

Open
henry54809 wants to merge 1 commit into
tchellomello:master from
henry54809:master
Open

Added ability for configuring auto reboot. #150
henry54809 wants to merge 1 commit into
tchellomello:master from
henry54809:master

Conversation

@henry54809

@henry54809 henry54809 commented Mar 3, 2020

Copy link
Copy Markdown

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.

Comment thread src/amcrest/system.py
return ret.content.decode('utf-8')

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

@houndci-bot houndci-bot Mar 3, 2020

Copy link
Copy Markdown

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)

Comment thread src/amcrest/http.py
_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

@houndci-bot houndci-bot Mar 3, 2020

Copy link
Copy Markdown

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)

Comment thread src/amcrest/http.py
_LOGGER = logging.getLogger(__name__)

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

@houndci-bot houndci-bot Mar 3, 2020

Copy link
Copy Markdown

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)

Copy link
Copy Markdown

Coverage Status

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

@tchellomello tchellomello left a comment

Copy link
Copy Markdown
Owner

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

Reviewers

@tchellomello tchellomello tchellomello requested changes

+1 more reviewer

@houndci-bot houndci-bot houndci-bot left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /