Commit 30329f5a authored by Kirill Smelkov's avatar Kirill Smelkov

go/neo/t/ Fix zhash for Python3

On py3 dict.keys() returns iterator instead of list:

    $ ./ zhash
    Traceback (most recent call last):
      File "/home/kirr/src/neo/src/", line 141, in <module>
      File "/home/kirr/src/neo/src/", line 138, in main
      File "/home/kirr/src/neo/src/", line 59, in zhash
        optv, argv = getopt(sys.argv[2:], "h", ["help", "check=", "bench="] + hashRegistry.keys())
    TypeError: can only concatenate list (not "dict_keys") to list
parent 1193c44e
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2017-2018 Nexedi SA and Contributors.
# Copyright (C) 2017-2022 Nexedi SA and Contributors.
# Kirill Smelkov <>
# This program is free software: you can Use, Study, Modify and Redistribute
......@@ -56,7 +56,7 @@ def zhash():
optv, argv = getopt(sys.argv[2:], "h", ["help", "check=", "bench="] + hashRegistry.keys())
optv, argv = getopt(sys.argv[2:], "h", ["help", "check=", "bench="] + list(hashRegistry.keys()))
except GetoptError as e:
print("E: %s" % e, file=sys.stderr)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment