diff data_manager/fetch_refseq.py @ 3:4852eb1a75e5 draft

planemo upload for repository https://github.com/pvanheus/refseq_fasta_data_manager commit b682adad2c3c74567d23e1a5cf2bfcc3df1c96ae
author sanbi-uwc
date Fri, 07 Sep 2018 18:41:23 -0400
parents a4ee45e7237b
children d878e492546c
line wrap: on
line diff
--- a/data_manager/fetch_refseq.py	Fri Sep 07 18:08:23 2018 -0400
+++ b/data_manager/fetch_refseq.py	Fri Sep 07 18:41:23 2018 -0400
@@ -52,9 +52,9 @@
         while input_filename != 'STOP':
             if debug:
                 print('Reading', input_filename, file=sys.stderr)
-            with gzip.open(input_filename) as input_file:
+            with gzip.open(input_filename, 'rb') as input_file:
                 read_chunk = functools.partial(input_file.read, (chunk_size))
-                for data in iter(read_chunk, ''):  # use '' as a sentinel to stop the loop
+                for data in iter(read_chunk, b''):  # use b'' as a sentinel to stop the loop. note '' != b'' in Python 3
                     output_file.write(data)
             os.unlink(input_filename)
             input_filename = conn.get()