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 a DownloadJob class #409
Conversation
82b655b
to
5939d2b
Compare
except CryptoError as e: | ||
set_object_decryption_status_with_content(db_object, session, False) | ||
logger.debug('Failed to decrypt {}: {}'.format(db_object.filename, e)) | ||
raise e |
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.
and then this exception gets handled in ApiJob._do_call_api
✅
# are on Qubes, we should move the file to the data directory and name it the same as the | ||
# server (e.g. spotless-tater-msg.gpg). | ||
filepath_in_datadir = os.path.join(self.data_dir, server_filename) | ||
shutil.move(file_path, filepath_in_datadir) |
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.
where is this being done now? (the file download logic won't work on Qubes otherwise) also let's preserve the above comment since otherwise it's not obvious why this file moving is being done
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.
Whoops! Don't know how I missed that comment! Yes, will add back and test on qubes.
closing because this was broken down into several PRs: |
Description
Resolves #406
Behavior should remain the same. This adds a lot of new tests and an API download base class.
Test Plan