Commit 27ccddc5 authored by Leo Pound Singer's avatar Leo Pound Singer

Do not import exceptions module

Required for compatibility with Python >= 2.7 and 3.
According to the Python 2.7 documentation:
"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."
The Python 3 manual makes no mention of the exceptions module.
Original: 8d5184375358c199fe01408201ad42fa9337991d
parent 4263c098
......@@ -7,7 +7,6 @@ __date__ = '$Date$'
__version__ = '$Revision$'
import string,sys,os
import exceptions
from glue import pipeline
from pylab import *
import operator
......@@ -15,7 +14,7 @@ from math import *
import numpy
import time
class StringError(exceptions.Exception):
class StringError(Exception):
def __init__(self, args=None):
self.args = args
......
......@@ -6,7 +6,7 @@ __date__ = "$Date$"
__name__ = "plotbankefficiency"
__title__ = "Figure of merits for BankEfficiency results."
import getopt, sys, os, re, glob, exceptions, dircache, string
import getopt, sys, os, re, glob, dircache, string
from optparse import *
from matplotlib.ticker import FormatStrFormatter
from numpy import *
......
......@@ -2,7 +2,6 @@
import sys
from optparse import *
import exceptions
from types import *
import matplotlib
......
......@@ -4,7 +4,6 @@ import sys
import os
from optparse import *
import re
import exceptions
import glob
from types import * #!!!what does this do?
from operator import itemgetter
......
import sys
import os
from optparse import *
import exceptions
import subprocess
import ConfigParser as cp
......
......@@ -10,13 +10,12 @@ __version__ = '$Revision$'
import copy
import string
import exceptions
import sys, os, re, subprocess
from glue import pipeline
from glue import lal
class InspiralError(exceptions.Exception):
class InspiralError(Exception):
def __init__(self, args=None):
self.args = args
......
......@@ -16,7 +16,6 @@ import sys
import os
from optparse import *
import re
import exceptions
import glob
from types import *
......
......@@ -4,7 +4,6 @@ import sys
import os
import shutil
import re
import exceptions
import glob
import string
......
......@@ -16,7 +16,6 @@ import sys
import os
from optparse import *
import re
import exceptions
import glob
#from types import *
......
......@@ -13,7 +13,6 @@ __date__ = '$Date$'
__version__ = '$Revision$'
import string
import exceptions
import os
from glue import pipeline
import sys
......
......@@ -23,7 +23,6 @@ import re
import string
import tempfile
import ConfigParser
import exceptions
# append the lalapps python path
# sys.path.append('/home/matthew/lscsoft/lib/python')
......
......@@ -23,7 +23,6 @@ import re
import string
import tempfile
import ConfigParser
import exceptions
# import the lalapps pipeline modules
from glue import pipeline
......
......@@ -11,7 +11,6 @@ import sys
import os
import string
import re
import exceptions
import getopt
# program usage
......
......@@ -14,7 +14,6 @@ import getopt
import re
import string
import tempfile
import exceptions
import random
import math
......
......@@ -13,7 +13,6 @@ __date__ = '$Date$'
__version__ = '$Revision$'
import string
import exceptions
import os
from glue import pipeline
......
......@@ -10,7 +10,6 @@ __date__ = '$Date$'
__version__ = '$Revision$'
import string
import exceptions
import os
from glue import pipeline
......
......@@ -18,7 +18,6 @@ import re
import string
import tempfile
import ConfigParser
import exceptions
# append the lalapps python path
sys.path.append('/home/matthew/lscsoft/lib/python')
......
......@@ -33,7 +33,6 @@ import getopt
import re
import string
import tempfile
import exceptions
import random
import math
import ConfigParser
......
......@@ -7,11 +7,10 @@ __date__ = '$Date$'
__version__ = '$Revision$'
import string
import exceptions
from glue import pipeline
class RingError(exceptions.Exception):
class RingError(Exception):
def __init__(self, args=None):
self.args = args
......
......@@ -21,7 +21,6 @@ __date__ = '$Date$'
__version__ = '$Revision$'
import string
import exceptions
import os
from glue import pipeline
......@@ -33,7 +32,7 @@ def version():
return __version__
class StochasticError(exceptions.Exception):
class StochasticError(Exception):
def __init__(self, args=None):
self.args = args
......
......@@ -3,7 +3,6 @@
import sys
import os
import re
import exceptions
import time
from types import *
from optparse import OptionParser
......
......@@ -31,7 +31,6 @@ import re
import time
import string
import math
import exceptions
import ConfigParser
import subprocess
from tracksearchutils import determineDataPadding
......
......@@ -25,7 +25,6 @@ import os
import numpy
import random
import time
import exceptions
###########################################
from pyfann import libfann
###########################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment