From 22c46ea38f6b0c0010907bf7e5a0039281f3cb47 Mon Sep 17 00:00:00 2001 From: Pavel Šimerda Date: Oct 14 2016 09:18:53 +0000 Subject: trivial: use ImportError directly There is no need to use the `exceptions` module and it won't be available in Python 3.x. The exceptions are defined in the module exceptions. This module never needs to be imported explicitly: the exceptions are provided in the built-in namespace as well as the exceptions module. (https://docs.python.org/2/library/exceptions.html) Signed-off-by: Pavel Šimerda --- diff --git a/koji/__init__.py b/koji/__init__.py index d52e666..6fe84d2 100644 --- a/koji/__init__.py +++ b/koji/__init__.py @@ -31,7 +31,6 @@ import base64 import datetime import ConfigParser import errno -import exceptions from fnmatch import fnmatch import httplib import imp @@ -1921,9 +1920,7 @@ class ClientSession(object): the server side.""" if not krbV: - raise exceptions.ImportError( - "Please install python-krbV to use kerberos." - ) + raise ImportError("Please install python-krbV to use kerberos.") ctx = krbV.default_context()