From 05c02f838df807e3fa30ba87ba54a10de5ea4cf5 Mon Sep 17 00:00:00 2001
From: Duncan Macleod <duncan.macleod@ligo.org>
Date: Wed, 1 May 2019 23:16:14 +0100
Subject: [PATCH] gracedb.superevents: decode input to StringIO

only required on python2, but this code will break on python3 anyway
---
 gracedb/superevents/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gracedb/superevents/models.py b/gracedb/superevents/models.py
index 815a4bebf..b91e3e28f 100644
--- a/gracedb/superevents/models.py
+++ b/gracedb/superevents/models.py
@@ -362,7 +362,7 @@ class Superevent(CleanSaveModel, AutoIncrementModel):
         # object's primary key. We prepend 'superevent' so as to not
         # have collisions with Event files
         hash_input = 'superevent' + str(self.id)
-        hdf = StringIO(sha1(hash_input).hexdigest())
+        hdf = StringIO(sha1(hash_input).hexdigest().decode('utf-8'))
 
         # Build up the nodes of the directory structure
         nodes = [hdf.read(i) for i in settings.GRACEDB_DIR_DIGITS]
-- 
GitLab