Skip to content

Commit

Permalink
fix redis and py27
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Apr 19, 2020
1 parent 75704db commit f64dad9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sourmash/nodegraph.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: UTF-8 -*-
from __future__ import unicode_literals, division
from __future__ import unicode_literals, division, print_function

from struct import pack, unpack
import sys
Expand Down
2 changes: 2 additions & 0 deletions sourmash/sbt_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ def __init__(self, **kwargs):
self.conn = redis.Redis(**self.redis_args)

def save(self, path, content):
if not isinstance(content, bytes):
content = bytes(content)
self.conn.set(path, content)
return path

Expand Down

0 comments on commit f64dad9

Please sign in to comment.