#1166 Fix deprecation warning on call to ConfigParser.readfp
Closed 5 years ago by cqi. Opened 5 years ago by cqi.
cqi/koji fix-warning  into  master

file modified
+4 -1
@@ -1705,7 +1705,10 @@ 

      for configFile in configs:

          f = open(configFile)

          config = six.moves.configparser.ConfigParser()

-         config.readfp(f)

+         if six.PY3:

+             config.read_file(f)

+         else:

+             config.readfp(f)

          f.close()

          if config.has_section(profile_name):

              got_conf = True

This change would be useful for other projects to suppress lots of
deprecation warning messages.

Signed-off-by: Chenxiong Qi cqi@redhat.com

rebased onto 2ec2cbd

5 years ago

@julian8628 Oh, I didn't notice your PR. Thanks for fixing that. :)

Pull-Request has been closed by cqi

5 years ago
Metadata