Commits

Nate Coraor  committed af36732

Be more forgiving about running the disk accounting scripts from outside the galaxy-dist directory.

  • Participants
  • Parent commits 502e390

Comments (0)

Files changed (2)

File scripts/set_dataset_sizes.py

 from ConfigParser import ConfigParser
 from optparse import OptionParser
 
+default_config = os.path.abspath( os.path.join( os.path.dirname( __file__ ), '..', 'universe_wsgi.ini') )
+
 parser = OptionParser()
-parser.add_option( '-c', '--config', dest='config', help='Path to Galaxy config file (universe_wsgi.ini)', default='universe_wsgi.ini' )
+parser.add_option( '-c', '--config', dest='config', help='Path to Galaxy config file (universe_wsgi.ini)', default=default_config )
 ( options, args ) = parser.parse_args()
 
 def init():

File scripts/set_user_disk_usage.py

 from ConfigParser import ConfigParser
 from optparse import OptionParser
 
+default_config = os.path.abspath( os.path.join( os.path.dirname( __file__ ), '..', 'universe_wsgi.ini') )
+
 parser = OptionParser()
-parser.add_option( '-c', '--config', dest='config', help='Path to Galaxy config file (universe_wsgi.ini)', default='universe_wsgi.ini' )
+parser.add_option( '-c', '--config', dest='config', help='Path to Galaxy config file (universe_wsgi.ini)', default=default_config )
 parser.add_option( '-u', '--username', dest='username', help='Username of user to update', default='all' )
 parser.add_option( '-e', '--email', dest='email', help='Email address of user to update', default='all' )
 parser.add_option( '--dry-run', dest='dryrun', help='Dry run (show changes but do not save to database)', action='store_true', default=False )