#9078 Fix build_composeinfo and port to py3
Merged 4 years ago by mohanboddu. Opened 4 years ago by mohanboddu.
mohanboddu/releng master  into  master

file modified
+5 -5
@@ -1,4 +1,4 @@ 

- #!/usr/bin/env python

+ #!/usr/bin/python3

  

  # Copyright (C) 2013 Red Hat Inc.

  # SPDX-License-Identifier:	GPL-2.0+
@@ -7,7 +7,7 @@ 

  import sys

  from argparse import ArgumentParser

  import logging

- import ConfigParser

+ import configparser

  import pprint

  

  #.composeinfo
@@ -51,8 +51,8 @@ 

          logging.critical(".composeinfo already exists under %s", composeFile)

          return 5

      variants = dict()

-     composeInfoParser = ConfigParser.ConfigParser()

-     treeInfoParser = ConfigParser.ConfigParser()

+     composeInfoParser = configparser.ConfigParser()

+     treeInfoParser = configparser.ConfigParser()

      for treeinfo in treeinfos:

          logging.debug("treeinfo: %s", treeinfo)

          # treepath is relative from the composepath.
@@ -60,7 +60,7 @@ 

  

          try:

              treeInfoParser.read(treeinfo)

-         except ConfigParser.MissingSectionHeaderError, e:

+         except configparser.MissingSectionHeaderError as e:

              logging.critical('%s is not parsable: %s', treeinfo, e)

              return 10

  

Pull-Request has been merged by mohanboddu

4 years ago
Metadata