Blame SOURCES/0001-exceptions-module-doesn-t-have-to-be-imported.patch

1070a0
From 8d1dbdc5e56b32ad1d6493904d30e85aa3b5fa2b Mon Sep 17 00:00:00 2001
1070a0
From: Tomas Kasparek <tkasparek@redhat.com>
1070a0
Date: Mon, 5 Mar 2018 10:47:30 +0100
1070a0
Subject: [PATCH 01/17] exceptions module doesn't have to be imported
1070a0
1070a0
---
1070a0
 koan/app.py       | 3 +--
1070a0
 koan/register.py  | 3 +--
1070a0
 koan/utils.py     | 3 +--
1070a0
 koan/vmwcreate.py | 3 +--
1070a0
 4 files changed, 4 insertions(+), 8 deletions(-)
1070a0
1070a0
diff --git a/koan/app.py b/koan/app.py
1070a0
index e0b2d66..d911dad 100755
1070a0
--- a/koan/app.py
1070a0
+++ b/koan/app.py
1070a0
@@ -49,7 +49,6 @@ except:
1070a0
     True = 1
1070a0
     False = 0
1070a0
 
1070a0
-import exceptions
1070a0
 import time
1070a0
 import shutil
1070a0
 import errno
1070a0
@@ -252,7 +251,7 @@ def main():
1070a0
 
1070a0
 #=======================================================
1070a0
 
1070a0
-class InfoException(exceptions.Exception):
1070a0
+class InfoException(Exception):
1070a0
     """
1070a0
     Custom exception for tracking of fatal errors.
1070a0
     """
1070a0
diff --git a/koan/register.py b/koan/register.py
1070a0
index 0d30c7b..9924d85 100755
1070a0
--- a/koan/register.py
1070a0
+++ b/koan/register.py
1070a0
@@ -27,7 +27,6 @@ try:
1070a0
     from optparse import OptionParser
1070a0
 except:
1070a0
     from opt_parse import OptionParser  # importing this for backwards compat with 2.2
1070a0
-import exceptions
1070a0
 try:
1070a0
     import subprocess as sub_process
1070a0
 except:
1070a0
@@ -100,7 +99,7 @@ def main():
1070a0
 
1070a0
 #=======================================================
1070a0
 
1070a0
-class InfoException(exceptions.Exception):
1070a0
+class InfoException(Exception):
1070a0
     """
1070a0
     Custom exception for tracking of fatal errors.
1070a0
     """
1070a0
diff --git a/koan/utils.py b/koan/utils.py
1070a0
index 7fcc12d..475bcd0 100644
1070a0
--- a/koan/utils.py
1070a0
+++ b/koan/utils.py
1070a0
@@ -25,7 +25,6 @@ import random
1070a0
 import os
1070a0
 import traceback
1070a0
 import tempfile
1070a0
-import exceptions
1070a0
 ANCIENT_PYTHON = 0
1070a0
 try:
1070a0
     try:
1070a0
@@ -59,7 +58,7 @@ VIRT_STATE_NAME_MAP = {
1070a0
    6 : "crashed"
1070a0
 }
1070a0
 
1070a0
-class InfoException(exceptions.Exception):
1070a0
+class InfoException(Exception):
1070a0
     """
1070a0
     Custom exception for tracking of fatal errors.
1070a0
     """
1070a0
diff --git a/koan/vmwcreate.py b/koan/vmwcreate.py
1070a0
index f5603d8..1bde891 100755
1070a0
--- a/koan/vmwcreate.py
1070a0
+++ b/koan/vmwcreate.py
1070a0
@@ -25,7 +25,6 @@ import os, sys, time, stat
1070a0
 import tempfile
1070a0
 import random
1070a0
 from optparse import OptionParser
1070a0
-import exceptions
1070a0
 import errno
1070a0
 import re
1070a0
 import virtinst
1070a0
@@ -64,7 +63,7 @@ memsize = "%(MEMORY)s"
1070a0
 """
1070a0
 #ide1:0.filename = "%(PATH_TO_ISO)s"
1070a0
 
1070a0
-class VirtCreateException(exceptions.Exception):
1070a0
+class VirtCreateException(Exception):
1070a0
     pass
1070a0
 
1070a0
 def random_mac():
1070a0
-- 
1070a0
2.5.5
1070a0