Skip to content
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

Add sleep mode #94

Closed
wants to merge 3 commits into from
Closed

Add sleep mode #94

wants to merge 3 commits into from

Conversation

bezineb5
Copy link

@bezineb5 bezineb5 commented Jun 22, 2024

This PR adds a put_in_sleep_mode method. This puts the QNAP NAS in sleep mode.
Also updated tox tests.

This is tested on a QNAP TS-251+ with QTS 5.1.7.2770.

@@ -40,13 +40,6 @@
print(e.args)
traceback.print_exc()

try:
qnap.get_external_drive()
Copy link
Author

Choose a reason for hiding this comment

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

This method no longer exists

@@ -50,7 +50,6 @@ def _init_session(self):
if self._login() is False:
self._session_error = True
self._debuglog("Login failed, unable to process request")
return
Copy link
Author

Choose a reason for hiding this comment

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

pylint was failing on this useless return


def file_get_contents(directory, file):
file = os.path.join(response_directory, directory, file)
if not os.path.exists(file):
return None

with open(file, 'r') as myfile:
Copy link
Author

Choose a reason for hiding this comment

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

The linter was unhappy about the encoding

@@ -19,7 +22,7 @@ setenv =
LANG=C.UTF-8
PYTHONPATH = {toxinidir}:{toxinidir}/qnapstats
commands =
flake8
Copy link
Author

Choose a reason for hiding this comment

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

It was testing all installed packages

Copy link

stale bot commented Sep 21, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 21, 2024
@stale stale bot closed this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant