From 2a59e8e4297d264d375378dce2cb738b1f085a6f Mon Sep 17 00:00:00 2001 From: Anders Date: Wed, 3 Apr 2019 21:59:48 +0000 Subject: [PATCH] Fix issue #4596 Make synapse_port_db --curses work with Python 3. Signed-off-by: Anders Jensen-Waud --- changelog.d/5003.bugfix | 1 + scripts/synapse_port_db | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/5003.bugfix diff --git a/changelog.d/5003.bugfix b/changelog.d/5003.bugfix new file mode 100644 index 000000000..9955dc871 --- /dev/null +++ b/changelog.d/5003.bugfix @@ -0,0 +1 @@ +Fix issue #4596 so synapse_port_db script works with --curses option on Python 3. Contributed by Anders Jensen-Waud . diff --git a/scripts/synapse_port_db b/scripts/synapse_port_db index 2fa01d1a1..3de394b03 100755 --- a/scripts/synapse_port_db +++ b/scripts/synapse_port_db @@ -811,7 +811,7 @@ class CursesProgress(Progress): middle_space = 1 items = self.tables.items() - items.sort(key=lambda i: (i[1]["perc"], i[0])) + items = sorted(items, key=lambda i: (i[1]["perc"], i[0])) for i, (table, data) in enumerate(items): if i + 2 >= rows: