teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.13.x-pythondistdeps.py-add-forgotten-import.patch

Igor Gnatenko adf839
From 30d472c8af086df077e6cf047a87fdaf93c9b21b Mon Sep 17 00:00:00 2001
Igor Gnatenko adf839
From: Igor Gnatenko <ignatenko@redhat.com>
Igor Gnatenko adf839
Date: Wed, 24 Aug 2016 15:37:16 +0200
Igor Gnatenko adf839
Subject: [PATCH] pythondistdeps.py: add forgotten import
Igor Gnatenko adf839
Igor Gnatenko adf839
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
Igor Gnatenko adf839
---
Igor Gnatenko adf839
 scripts/pythondistdeps.py | 3 ++-
Igor Gnatenko adf839
 1 file changed, 2 insertions(+), 1 deletion(-)
Igor Gnatenko adf839
Igor Gnatenko adf839
diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
Igor Gnatenko adf839
index 76017f3..e4b99e2 100755
Igor Gnatenko adf839
--- a/scripts/pythondistdeps.py
Igor Gnatenko adf839
+++ b/scripts/pythondistdeps.py
Igor Gnatenko adf839
@@ -15,6 +15,7 @@ from getopt import getopt
Igor Gnatenko adf839
 from os.path import basename, dirname, isdir, sep
Igor Gnatenko adf839
 from sys import argv, stdin, version
Igor Gnatenko adf839
 from distutils.sysconfig import get_python_lib
Igor Gnatenko adf839
+from warnings import warn
Igor Gnatenko adf839
 
Igor Gnatenko adf839
 
Igor Gnatenko adf839
 opts, args = getopt(
Igor Gnatenko adf839
@@ -108,7 +109,7 @@ for f in files:
Igor Gnatenko adf839
         dist = Distribution.from_location(path_item, dist_name, metadata)
Igor Gnatenko adf839
         # Check if py_version is defined in the file
Igor Gnatenko adf839
         if not dist.py_version:
Igor Gnatenko adf839
-            warnings.warn("Version for {!r} has not been found".format(dist), RuntimeWarning)
Igor Gnatenko adf839
+            warn("Version for {!r} has not been found".format(dist), RuntimeWarning)
Igor Gnatenko adf839
             continue
Igor Gnatenko adf839
         if (Provides_PyMajorVer_Variant or legacy_Provides or legacy) and Provides:
Igor Gnatenko adf839
             # Get the Python major version
Igor Gnatenko adf839
-- 
Igor Gnatenko adf839
2.9.3
Igor Gnatenko adf839