Skip to content

Commit

Permalink
Renaming the keyword argument
Browse files Browse the repository at this point in the history
  • Loading branch information
silverdaz committed May 17, 2024
1 parent e57d676 commit b4ee9c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crypt4gh/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ def build_recipients():

try:
if header:
header = open(header, 'wb')
header = open(header, 'wb') # let it raise exception
lib.encrypt(recipient_keys,
sys.stdin.buffer,
sys.stdout.buffer,
header= header,
headerfile = header,
offset = range_start,
span = range_span)
finally:
Expand Down
8 changes: 4 additions & 4 deletions crypt4gh/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _encrypt_segment(data, process, key):


@close_on_broken_pipe
def encrypt(keys, infile, outfile, header_stream=None, offset=0, span=None):
def encrypt(keys, infile, outfile, headerfile=None, offset=0, span=None):
'''Encrypt infile into outfile, using the list of keys.
Expand All @@ -57,8 +57,8 @@ def encrypt(keys, infile, outfile, header_stream=None, offset=0, span=None):
'''

LOG.info('Encrypting the file')

header_stream = header_stream or outfile
headerfile = headerfile or outfile

# Forward to start position
LOG.debug(" Start Coordinate: %s", offset)
Expand Down Expand Up @@ -93,7 +93,7 @@ def encrypt(keys, infile, outfile, header_stream=None, offset=0, span=None):
header_bytes = header.serialize(header_packets)

LOG.debug('header length: %d', len(header_bytes))
header_stream.write(header_bytes)
headerfile.write(header_bytes)

# ...and cue music
LOG.debug("Streaming content")
Expand Down

0 comments on commit b4ee9c7

Please sign in to comment.