From 416c2d7ba06e784cb1d53ced46102d82836187b5 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Sun, 31 Mar 2019 15:41:32 +0200 Subject: [PATCH] Cython: made fasta formatter cleaner --- python/obitools3/format/header.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/obitools3/format/header.pyx b/python/obitools3/format/header.pyx index 9e24106..8b15d8c 100755 --- a/python/obitools3/format/header.pyx +++ b/python/obitools3/format/header.pyx @@ -6,7 +6,7 @@ from obitools3.dms.capi.obiview cimport NUC_SEQUENCE_COLUMN, \ QUALITY_COLUMN, \ COUNT_COLUMN -from obitools3.utils cimport str2bytes +from obitools3.utils cimport str2bytes, bytes2str_object from obitools3.dms.column.column cimport Column_line @@ -63,7 +63,7 @@ cdef class HeaderFormat: if type(value) == Column_line: value = value.bytes() else: - value = str2bytes(str(value)) # TODO ugly but how else? + value = str2bytes(str(bytes2str_object(value))) # genius programming if value is not None: lines.append(k + b"=" + value + b";")