Fix pep8 failures
This fixes the following failures when running "tox -e pep8": ./designatedashboard/dashboards/project/dns_domains/tables.py:55:15: H201 no 'except:' at least use 'except Exception:' except: ^ ./designatedashboard/dashboards/project/dns_domains/tables.py:177:5: H238 old style class declaration, use new style (inherit from `object`) class Meta: ^ ./designatedashboard/dashboards/project/dns_domains/tables.py:217:5: H238 old style class declaration, use new style (inherit from `object`) class Meta: ^ ./designatedashboard/tests/base.py:53:66: W292 no newline at end of file self.log_fixture = self.useFixture(fixtures.FakeLogger()) Change-Id: I33c4293edc16257ae8cebe7c76788075eae23a08
This commit is contained in:
parent
6c9f388b02
commit
560a88b095
@ -52,7 +52,7 @@ class CreateDomain(tables.LinkAction):
|
|||||||
if self.table:
|
if self.table:
|
||||||
quota = api.designate.quota_get(request)
|
quota = api.designate.quota_get(request)
|
||||||
return quota['domains'] > len(self.table.data)
|
return quota['domains'] > len(self.table.data)
|
||||||
except:
|
except Exception:
|
||||||
msg = _("The quotas could not be retrieved.")
|
msg = _("The quotas could not be retrieved.")
|
||||||
messages.warning(request, msg)
|
messages.warning(request, msg)
|
||||||
return True
|
return True
|
||||||
@ -174,7 +174,7 @@ class DomainsTable(tables.DataTable):
|
|||||||
serial = tables.Column("serial",
|
serial = tables.Column("serial",
|
||||||
verbose_name=_("Serial"))
|
verbose_name=_("Serial"))
|
||||||
|
|
||||||
class Meta:
|
class Meta(object):
|
||||||
name = "domains"
|
name = "domains"
|
||||||
verbose_name = _("Domains")
|
verbose_name = _("Domains")
|
||||||
table_actions = (CreateDomain, DeleteDomain,)
|
table_actions = (CreateDomain, DeleteDomain,)
|
||||||
@ -214,7 +214,7 @@ class RecordsTable(tables.DataTable):
|
|||||||
verbose_name=_("TTL")
|
verbose_name=_("TTL")
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta(object):
|
||||||
name = "records"
|
name = "records"
|
||||||
verbose_name = _("Records")
|
verbose_name = _("Records")
|
||||||
table_actions = (CreateRecord,)
|
table_actions = (CreateRecord,)
|
||||||
|
@ -50,4 +50,4 @@ class TestCase(testtools.TestCase):
|
|||||||
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
|
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
|
||||||
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
|
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
|
||||||
|
|
||||||
self.log_fixture = self.useFixture(fixtures.FakeLogger())
|
self.log_fixture = self.useFixture(fixtures.FakeLogger())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user