[gnome-continuous-yocto/gnomeostree-3.28-rocko: 613/8267] scripts: Rename ConfigParser -> configparser for python3
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 613/8267] scripts: Rename ConfigParser -> configparser for python3
- Date: Sat, 16 Dec 2017 20:40:20 +0000 (UTC)
commit fa4275bbc0098124f3b44e0eafae83692db778b9
Author: Ed Bartosh <ed bartosh linux intel com>
Date: Thu May 19 12:28:12 2016 +0300
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>
scripts/combo-layer | 6 +++---
scripts/contrib/python/generate-manifest-3.5.py | 2 +-
scripts/devtool | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 52367f0..234d9e4 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -26,7 +26,7 @@ import optparse
import logging
import subprocess
import tempfile
-import ConfigParser
+import configparser
import re
import copy
import pipes
@@ -87,7 +87,7 @@ class Configuration(object):
self.commit_msg_template = value
logger.debug("Loading config file %s" % self.conffile)
- self.parser = ConfigParser.ConfigParser()
+ self.parser = configparser.ConfigParser()
with open(self.conffile) as f:
self.parser.readfp(f)
@@ -116,7 +116,7 @@ class Configuration(object):
self.localconffile = lcfile
logger.debug("Loading local config file %s" % self.localconffile)
- self.localparser = ConfigParser.ConfigParser()
+ self.localparser = configparser.ConfigParser()
with open(self.localconffile) as f:
self.localparser.readfp(f)
diff --git a/scripts/contrib/python/generate-manifest-3.5.py b/scripts/contrib/python/generate-manifest-3.5.py
index 41f209b..e04da1d 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -167,7 +167,7 @@ if __name__ == "__main__":
#
m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib
${PN}-codecs ${PN}-io ${PN}-math",
- "__future__.* _abcoll.* abc.* ast.* copy.* copyreg.* ConfigParser.* " +
+ "__future__.* _abcoll.* abc.* ast.* copy.* copyreg.* configparser.* " +
"genericpath.* getopt.* linecache.* new.* " +
"os.* posixpath.* struct.* " +
"warnings.* site.* stat.* " +
diff --git a/scripts/devtool b/scripts/devtool
index 9ac6e79..4dbb527 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -22,7 +22,7 @@ import os
import argparse
import glob
import re
-import ConfigParser
+import configparser
import subprocess
import logging
@@ -51,12 +51,12 @@ class ConfigHandler(object):
def __init__(self, filename):
self.config_file = filename
- self.config_obj = ConfigParser.SafeConfigParser()
+ self.config_obj = configparser.SafeConfigParser()
def get(self, section, option, default=None):
try:
ret = self.config_obj.get(section, option)
- except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
+ except (configparser.NoOptionError, configparser.NoSectionError):
if default != None:
ret = default
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]