Remove MissingTemplateException
Change-Id: I324e3ea4dcd19c0fc2a6202b49e49b26b6a0dd20
This commit is contained in:
@@ -19,7 +19,7 @@ import sys
|
|||||||
|
|
||||||
from tobiko.cmd import base
|
from tobiko.cmd import base
|
||||||
from tobiko.common import constants
|
from tobiko.common import constants
|
||||||
from tobiko.common import exceptions as exc
|
from tobiko.common import exceptions
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Python 3
|
# Python 3
|
||||||
@@ -69,7 +69,11 @@ class CreateUtil(base.TobikoCMD):
|
|||||||
except url_error.URLError:
|
except url_error.URLError:
|
||||||
stacks = self.stackManager.get_templates_names(
|
stacks = self.stackManager.get_templates_names(
|
||||||
strip_suffix=True)
|
strip_suffix=True)
|
||||||
raise exc.MissingTemplateException(templates="\n".join(stacks))
|
raise NoSuchTemplateError(templates="\n".join(stacks))
|
||||||
|
|
||||||
|
|
||||||
|
class NoSuchTemplateError(exceptions.TobikoException):
|
||||||
|
message = "No such template. Existing templates:\n%(templates)s"
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -40,7 +40,3 @@ class TobikoException(Exception):
|
|||||||
pass
|
pass
|
||||||
msg = ("'{!r}' object has no attribute {!r}").format(self, name)
|
msg = ("'{!r}' object has no attribute {!r}").format(self, name)
|
||||||
raise AttributeError(msg)
|
raise AttributeError(msg)
|
||||||
|
|
||||||
|
|
||||||
class MissingTemplateException(TobikoException):
|
|
||||||
message = "No such template. Existing templates:\n%(templates)s"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user