def run_upgrade_script(app, script_name):
    try:
        cur_script = __import__('datamigrations.%s' % script_name)
    except __HOLE__:
        # return if the script doesn't exist
        return

    print "Running %s.upgrade" % script_name
    script = getattr(cur_script, script_name)
    script.upgrade(app)
dataset/ETHPy150Open jkossen/imposter/datamigrations/__init__.py/run_upgrade_script