aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@gentoo.org>2014-05-30 22:26:53 -0400
committerDevan Franchini <twitch153@gentoo.org>2014-06-12 00:12:40 -0400
commit90ba3ff83233de06d5a83fd20d764ad499ff1e48 (patch)
tree8b72930470cf6d08fb6e25d2add7967416d9cd2e /layman/config.py
parentmakeconf.py: Implements cmp_to_key on prio_sort (diff)
downloadlayman-90ba3ff83233de06d5a83fd20d764ad499ff1e48.tar.gz
layman-90ba3ff83233de06d5a83fd20d764ad499ff1e48.tar.bz2
layman-90ba3ff83233de06d5a83fd20d764ad499ff1e48.zip
config.py: Adds py3 configparser support
Diffstat (limited to 'layman/config.py')
-rw-r--r--layman/config.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/layman/config.py b/layman/config.py
index aef0cc8..1cdd85f 100644
--- a/layman/config.py
+++ b/layman/config.py
@@ -30,7 +30,13 @@ __version__ = "0.2"
import sys
import os
-import ConfigParser
+
+try:
+ # Import for Python3
+ import configparser as ConfigParser
+except:
+ # Import for Python2
+ import ConfigParser
from layman.output import Message
from layman.utils import path