]> git.apps.os.sepia.ceph.com Git - ragweed.git/commitdiff
config: read_file() instead of deprecated readfp()
authorCasey Bodley <cbodley@redhat.com>
Fri, 17 Feb 2023 01:19:43 +0000 (20:19 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 20 Feb 2023 14:38:31 +0000 (09:38 -0500)
  ragweed/framework.py:385: DeprecationWarning: This method will be removed in future versions.  Use 'parser.read_file()' instead.
    cfg.readfp(f)

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 3b74aaef228abacc5ce880e4129d757eabd2de8a)

ragweed/framework.py

index 8d923250bf649daa0dd54df9f9a6edaae74298c4..f0815011934db8ce9b18d4ac1eb53d8826a4c225 100644 (file)
@@ -382,7 +382,7 @@ class RagweedEnv:
                 + 'variable RAGWEED_CONF to a config file.',
                 )
         with open(path, 'r') as f:
-            cfg.readfp(f)
+            cfg.read_file(f)
 
         for section in cfg.sections():
             try: