diff --git a/dbbackup/utils.py b/dbbackup/utils.py index 30aec8d3..e7cf3109 100644 --- a/dbbackup/utils.py +++ b/dbbackup/utils.py @@ -228,7 +228,9 @@ def get_passphrase(passphrase=passphrase): inputfile.seek(0) g = gnupg.GPG() result = g.decrypt_file( - file=inputfile, passphrase=get_passphrase(), output=temp_filename + fileobj_or_path=inputfile, + passphrase=get_passphrase(), + output=temp_filename, ) if not result: raise DecryptionError("Decryption failed; status: %s" % result.status) diff --git a/docs/configuration.rst b/docs/configuration.rst index a290108b..ba209eea 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -119,7 +119,7 @@ using GPG. :: Requirements: - Install the python package python-gnupg: - ``pip install python-gnupg``. + ``pip install python-gnupg>=0.5.0``. - You need a GPG key. (`GPG manual`_) - Set the setting ``DBBACKUP_GPG_RECIPIENT`` to the name of the GPG key. diff --git a/requirements/tests.txt b/requirements/tests.txt index e294db57..e975d619 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -6,7 +6,7 @@ pep8 psycopg2 pylint python-dotenv -python-gnupg +python-gnupg>=0.5.0 pytz testfixtures tox