better error checking
This commit is contained in:
parent
c2e2a3fad5
commit
5c244f2680
1 changed files with 5 additions and 4 deletions
|
@ -169,10 +169,11 @@ class PyTeXFormatter(FormatterIF, ABC):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def raw_name(self) -> str:
|
def raw_name(self) -> str:
|
||||||
try:
|
parts = self._input_file.name.split('.', maxsplit=1)
|
||||||
return self._input_file.name.split('.', maxsplit=1)[0]
|
if not len(parts) == 2:
|
||||||
except:
|
raise NotImplementedError # invalid file name
|
||||||
raise NotImplementedError
|
else:
|
||||||
|
return parts[0]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
|
Loading…
Reference in a new issue