diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-19 12:28:12 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 08:24:01 +0100 |
commit | fa4275bbc0098124f3b44e0eafae83692db778b9 (patch) | |
tree | 3285957da8be3052b7cc77bed4765e99436674c8 /scripts/devtool | |
parent | 3ee70cb7259aad3b53e51884ec5b9122e804d77e (diff) | |
download | poky-fa4275bbc0098124f3b44e0eafae83692db778b9.tar.gz |
scripts: Rename ConfigParser -> configparser for python3
The ConfigParser API was renamed to configparser in python 3.
Renamed ConfigParser -> configparser in scripts/ to make the
code working in python 3.
(From OE-Core rev: de6e98f272e623ce72e724e66920eecf10cb2d41)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/devtool')
-rwxr-xr-x | scripts/devtool | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/devtool b/scripts/devtool index 9ac6e798d2..4dbb527bc7 100755 --- a/scripts/devtool +++ b/scripts/devtool | |||
@@ -22,7 +22,7 @@ import os | |||
22 | import argparse | 22 | import argparse |
23 | import glob | 23 | import glob |
24 | import re | 24 | import re |
25 | import ConfigParser | 25 | import configparser |
26 | import subprocess | 26 | import subprocess |
27 | import logging | 27 | import logging |
28 | 28 | ||
@@ -51,12 +51,12 @@ class ConfigHandler(object): | |||
51 | 51 | ||
52 | def __init__(self, filename): | 52 | def __init__(self, filename): |
53 | self.config_file = filename | 53 | self.config_file = filename |
54 | self.config_obj = ConfigParser.SafeConfigParser() | 54 | self.config_obj = configparser.SafeConfigParser() |
55 | 55 | ||
56 | def get(self, section, option, default=None): | 56 | def get(self, section, option, default=None): |
57 | try: | 57 | try: |
58 | ret = self.config_obj.get(section, option) | 58 | ret = self.config_obj.get(section, option) |
59 | except (ConfigParser.NoOptionError, ConfigParser.NoSectionError): | 59 | except (configparser.NoOptionError, configparser.NoSectionError): |
60 | if default != None: | 60 | if default != None: |
61 | ret = default | 61 | ret = default |
62 | else: | 62 | else: |