diff options
author | Rob Austein <sra@hactrn.net> | 2011-07-27 18:21:45 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2011-07-27 18:21:45 +0000 |
commit | 4a739a155b00e582435d7906840f58282ebf8f7d (patch) | |
tree | f85fff06b273a81ed4b231cf08dceccf53dc2352 /scripts/upgrade-add-ghostbusters.py | |
parent | b961465c1d695dd510b00d9c734a169ef6fc0598 (diff) |
Consolidate all of the import voodoo for MySQLdb into a new module.
svn path=/buildtools/make-python-executable.py; revision=3946
Diffstat (limited to 'scripts/upgrade-add-ghostbusters.py')
-rw-r--r-- | scripts/upgrade-add-ghostbusters.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/scripts/upgrade-add-ghostbusters.py b/scripts/upgrade-add-ghostbusters.py index 06df2faa..8bfd5a81 100644 --- a/scripts/upgrade-add-ghostbusters.py +++ b/scripts/upgrade-add-ghostbusters.py @@ -19,17 +19,9 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """ -from __future__ import with_statement import getopt, sys, rpki.config, warnings -if hasattr(warnings, "catch_warnings"): - with warnings.catch_warnings(): - warnings.simplefilter("ignore", DeprecationWarning) - import MySQLdb, _mysql_exceptions -else: - import MySQLdb, _mysql_exceptions - -warnings.simplefilter("error", _mysql_exceptions.Warning) +from rpki.mysql_import import MySQLdb def fix(name, *statements): db = MySQLdb.connect(db = cfg.get("sql-database", section = name), |