Remove MissingTemplateException

Change-Id: I324e3ea4dcd19c0fc2a6202b49e49b26b6a0dd20
This commit is contained in:
Federico Ressi
2018-11-27 10:49:34 +01:00
parent 103c8af376
commit 7077365929
2 changed files with 6 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ import sys
from tobiko.cmd import base
from tobiko.common import constants
from tobiko.common import exceptions as exc
from tobiko.common import exceptions
try:
# Python 3
@@ -69,7 +69,11 @@ class CreateUtil(base.TobikoCMD):
except url_error.URLError:
stacks = self.stackManager.get_templates_names(
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():

View File

@@ -40,7 +40,3 @@ class TobikoException(Exception):
pass
msg = ("'{!r}' object has no attribute {!r}").format(self, name)
raise AttributeError(msg)
class MissingTemplateException(TobikoException):
message = "No such template. Existing templates:\n%(templates)s"