From 1afd06c8a49a7f906da6c24eec7d9bb16fd3f07b Mon Sep 17 00:00:00 2001 From: Radek Sieradzki Date: Mon, 5 Dec 2016 15:05:33 +0100 Subject: [PATCH] Fixed import for Python3 --- pg_view/helpers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pg_view/helpers.py b/pg_view/helpers.py index 445da53..0926226 100644 --- a/pg_view/helpers.py +++ b/pg_view/helpers.py @@ -1,9 +1,14 @@ -import ConfigParser import subprocess +import sys from pg_view import consts from pg_view.exceptions import InvalidConnectionParamError +if sys.hexversion >= 0x03000000: + import configparser as ConfigParser +else: + import ConfigParser + BYTES_IN_MB = 1048576 SECTORS_IN_MB = 2048 KB_IN_MB = 1024