+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
from __future__ import print_function
from __future__ import absolute_import
data_in = hashlib.md5(data_in).hexdigest().encode() + b"\n" + data_in
c.set(url, data_in)
data_out = c.get(url)
- digest, _, content = data_out.partition("\n")
- if digest != bytes(hashlib.md5(content).hexdigest()):
+ digest, _, content = data_out.partition(b"\n")
+ if digest != hashlib.md5(content).hexdigest().encode():
self.ok = False
except Exception as err:
self.ok = False