From 44b705f88f45211a778c07f909b2aa1d91da05e6 Mon Sep 17 00:00:00 2001 From: Oleksandr Shulgin Date: Tue, 2 Jun 2015 16:52:48 +0200 Subject: [PATCH] Improve identify_system: don't hardcode column names --- lib/extras.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extras.py b/lib/extras.py index 4d92e6fa..92dd8192 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -488,7 +488,7 @@ class ReplicationCursor(_cursor): """Get information about the cluster status.""" self.execute("IDENTIFY_SYSTEM") - return dict(zip(['systemid', 'timeline', 'xlogpos', 'dbname'], + return dict(zip([_.name for _ in self.description], self.fetchall()[0])) def quote_ident(self, ident):