-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add sleep mode #94
Conversation
@@ -40,13 +40,6 @@ | |||
print(e.args) | |||
traceback.print_exc() | |||
|
|||
try: | |||
qnap.get_external_drive() |
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.
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 |
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.
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: |
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.
The linter was unhappy about the encoding
@@ -19,7 +22,7 @@ setenv = | |||
LANG=C.UTF-8 | |||
PYTHONPATH = {toxinidir}:{toxinidir}/qnapstats | |||
commands = | |||
flake8 |
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.
It was testing all installed packages
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. |
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.