From 273ca83f6b47aafbc0fe1556f9f7695aaf1ad65e Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 1 Dec 2014 22:14:35 -0800 Subject: [PATCH] Fixing configparser import for Python 3. --- atticmatic/config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/atticmatic/config.py b/atticmatic/config.py index c11b784..20caa34 100644 --- a/atticmatic/config.py +++ b/atticmatic/config.py @@ -1,5 +1,11 @@ from collections import namedtuple -from ConfigParser import ConfigParser + +try: + # Python 2 + from ConfigParser import ConfigParser +except ImportError: + # Python 3 + from configparser import ConfigParser CONFIG_SECTION_LOCATION = 'location'