diff --git a/scripts/cleanup_datasets/cleanup_datasets.py b/scripts/cleanup_datasets/cleanup_datasets.py index a15c28ff954..35f2ced06c0 100644 --- a/scripts/cleanup_datasets/cleanup_datasets.py +++ b/scripts/cleanup_datasets/cleanup_datasets.py @@ -1,5 +1,9 @@ #!/usr/bin/env python +new_path = [ os.path.join( os.getcwd(), "lib" ) ] +new_path.extend( sys.path[1:] ) # remove scripts/ from the path +sys.path = new_path + from galaxy import eggs import pkg_resources pkg_resources.require( "SQLAlchemy >= 0.4" ) @@ -9,10 +13,6 @@ from datetime import datetime, timedelta from time import strftime from optparse import OptionParser -new_path = [ os.path.join( os.getcwd(), "lib" ) ] -new_path.extend( sys.path[1:] ) # remove scripts/ from the path -sys.path = new_path - import galaxy.model.mapping from galaxy.model.orm import and_, eagerload