fix: ExtentionError => ExtensionError
This commit is contained in:
parent
8f5ce6999f
commit
ece6afe0a9
1 changed files with 4 additions and 3 deletions
|
|
@ -55,6 +55,7 @@ from rougail.convert.object_model import (
|
|||
)
|
||||
from rougail.tiramisu import normalize_family, RENAME_TYPE
|
||||
from rougail.utils import undefined
|
||||
from rougail.error import ExtensionError
|
||||
|
||||
from .upgrade import RougailUpgrade
|
||||
from .i18n import _
|
||||
|
|
@ -114,7 +115,7 @@ class RougailOutputFormatter:
|
|||
rougailconfig["step.output"] = self.output_name
|
||||
self.rougailconfig = rougailconfig
|
||||
if self.rougailconfig["step.output"] != self.output_name:
|
||||
raise ExtentionError(
|
||||
raise ExtensionError(
|
||||
_('the "step.output" is not set to "{0}"').format(self.output_name)
|
||||
)
|
||||
# yaml.top_level_colon_align = True
|
||||
|
|
@ -163,10 +164,10 @@ class RougailOutputFormatter:
|
|||
def upgrade(self) -> None:
|
||||
filenames = self.rougailconfig["main_structural_directories"]
|
||||
if len(filenames) > 1:
|
||||
raise Exception(_("only one file is allowed"))
|
||||
raise ExtensionError(_('only one filename is allowed, not "{0}"').format(filenames))
|
||||
filename = Path(filenames[0])
|
||||
if not filename.is_file():
|
||||
raise Exception(_("only a file is allowed"))
|
||||
raise ExtensionError(_('"{0}" is not a valid file, but only a file is allowed').format(filename))
|
||||
|
||||
self.version_name, self.original_yaml = RougailUpgrade(self.rougailconfig).run(
|
||||
filename
|
||||
|
|
|
|||
Loading…
Reference in a new issue