aboutsummaryrefslogtreecommitdiffstats
path: root/pySim/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'pySim/exceptions.py')
-rw-r--r--pySim/exceptions.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/pySim/exceptions.py b/pySim/exceptions.py
index 831b1c9..68303e1 100644
--- a/pySim/exceptions.py
+++ b/pySim/exceptions.py
@@ -23,14 +23,17 @@
from __future__ import absolute_import
-import exceptions
-
+try:
+ # This is for compatibility with python 2 and 3
+ from exceptions import Exception
+except:
+ pass
-class NoCardError(exceptions.Exception):
+class NoCardError(Exception):
pass
-class ProtocolError(exceptions.Exception):
+class ProtocolError(Exception):
pass
-class ReaderError(exceptions.Exception):
+class ReaderError(Exception):
pass