Skip to content

Commit ae4974a

Browse files
committed
Closes #460: python-gnupg version increase breaks unencrypt_file function
1 parent 3d94b0d commit ae4974a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

dbbackup/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ def get_passphrase(passphrase=passphrase):
228228
inputfile.seek(0)
229229
g = gnupg.GPG()
230230
result = g.decrypt_file(
231-
file=inputfile, passphrase=get_passphrase(), output=temp_filename
231+
fileobj_or_path=inputfile,
232+
passphrase=get_passphrase(),
233+
output=temp_filename,
232234
)
233235
if not result:
234236
raise DecryptionError("Decryption failed; status: %s" % result.status)

docs/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ using GPG. ::
119119
Requirements:
120120

121121
- Install the python package python-gnupg:
122-
``pip install python-gnupg``.
122+
``pip install python-gnupg>=0.5.0``.
123123
- You need a GPG key. (`GPG manual`_)
124124
- Set the setting ``DBBACKUP_GPG_RECIPIENT`` to the name of the GPG key.
125125

requirements/tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pep8
66
psycopg2
77
pylint
88
python-dotenv
9-
python-gnupg
9+
python-gnupg>=0.5.0
1010
pytz
1111
testfixtures
1212
tox

0 commit comments

Comments
 (0)