From: Philipp Gesang Date: Thu, 6 Apr 2017 14:54:33 +0000 (+0200) Subject: parse buffer as header if passed as arg to next() X-Git-Tag: v2.2~7^2~183 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=dccfe10483a355fb51884131a5a5fcfc0aebcbfb;p=python-delta-tar parse buffer as header if passed as arg to next() --- diff --git a/deltatar/crypto.py b/deltatar/crypto.py index e6374ad..0226a48 100755 --- a/deltatar/crypto.py +++ b/deltatar/crypto.py @@ -531,6 +531,8 @@ class Decrypt (Crypto): def next (self, hdr): + if isinstance (hdr, bytes) is True: + hdr = hdr_read (hdr) paramversion = hdr ["paramversion"] if self.key is None: super().next (self.password, paramversion, hdr ["nacl"])