def reset_plugin(manager): if not manager.options.reset_plugin: return manager.disable_tasks() plugin = manager.options.reset_plugin if plugin == '__list__': console('%-20s Ver Tables' % 'Name') console('-' * 79) for k, v in sorted(plugin_schemas.iteritems()): tables = '' line_len = 0 for name in v['tables']: if line_len + len(name) + 2 >= 53: tables += '\n' tables += ' ' * 25 line_len = len(name) + 2 else: line_len += len(name) + 2 tables += name + ', ' tables = tables.rstrip(', ') console('%-20s %s %s' % (k, v['version'], tables)) else: try: reset_schema(plugin) console('The database for `%s` has been reset.' % plugin) except ValueError as e: console('Unable to reset %s: %s' % (plugin, e.message))
def reset_plugin(manager): if not manager.options.reset_plugin: return manager.disable_tasks() plugin = manager.options.reset_plugin try: reset_schema(plugin) console('The database for `%s` has been reset.' % plugin) except ValueError as e: console('Unable to reset %s: %s' % (plugin, e.message))
def reset_plugin(manager): if not manager.options.reset_plugin: return manager.disable_tasks() plugin = manager.options.reset_plugin try: reset_schema(plugin) console('The database for `%s` has been reset.' % plugin) except ValueError, e: console('Unable to reset %s: %s' % (plugin, e.message))