Drop unused TableFormater code

TableFormater was introduced as a workaround and it was commented
out in a later fix. It is no longer needed now.

TrivialFix

Change-Id: Ia960ee1abc5febcc95536f63d2d1dada357a73c6
This commit is contained in:
Akihiro Motoki
2016-01-02 22:17:59 +09:00
parent 9371c45864
commit 918a21a0e0

View File

@@ -21,7 +21,6 @@ import argparse
import logging
import re
from cliff.formatters import table
from cliff import lister
from cliff import show
from oslo_serialization import jsonutils
@@ -370,19 +369,6 @@ def update_dict(obj, dict, attributes):
dict[attribute] = getattr(obj, attribute)
class TableFormater(table.TableFormatter):
"""This class is used to keep consistency with prettytable 0.6.
https://bugs.launchpad.net/python-neutronclient/+bug/1165962
"""
def emit_list(self, column_names, data, stdout, parsed_args):
if column_names:
super(TableFormater, self).emit_list(column_names, data, stdout,
parsed_args)
else:
stdout.write('\n')
# command.OpenStackCommand is abstract class so that metaclass of
# subclass must be subclass of metaclass of all its base.
# otherwise metaclass conflict exception is raised.
@@ -405,14 +391,6 @@ class NeutronCommand(command.OpenStackCommand):
shadow_resource = None
parent_id = None
def __init__(self, app, app_args):
super(NeutronCommand, self).__init__(app, app_args)
# NOTE(markmcclain): This is no longer supported in cliff version 1.5.2
# see https://bugs.launchpad.net/python-neutronclient/+bug/1265926
# if hasattr(self, 'formatters'):
# self.formatters['table'] = TableFormater()
@property
def cmd_resource(self):
if self.shadow_resource: