pavlix / koji

Forked from koji 7 years ago
Clone

eee9cf2 python3: avoid using exceptions module

Authored and Committed by Pavel Šimerda 7 years ago
    python3: avoid using exceptions module
    
    The `exceptions` module is no longer available in Python 3.x and
    can be avoided easily. We just need to use a different way to evade
    the name clash with the module's own ImportError. One way is to
    use the `__builtins__` module that is available in both 2.x (including
    2.4.3) and 3.x.
    
    See also:
    
        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 <pavlix@pavlix.net>
    
        
file modified
+4 -4