Improve MinetestCheck name validation
This commit is contained in:
@@ -24,14 +24,14 @@ class ContentType(Enum):
|
||||
|
||||
if self == ContentType.MOD:
|
||||
if not other.isModLike():
|
||||
raise MinetestCheckError("expected a mod or modpack, found " + other.value)
|
||||
raise MinetestCheckError("Expected a mod or modpack, found " + other.value)
|
||||
|
||||
elif self == ContentType.TXP:
|
||||
if other != ContentType.UNKNOWN and other != ContentType.TXP:
|
||||
raise MinetestCheckError("expected a " + self.value + ", found a " + other.value)
|
||||
|
||||
elif other != self:
|
||||
raise MinetestCheckError("expected a " + self.value + ", found a " + other.value)
|
||||
raise MinetestCheckError("Expected a " + self.value + ", found a " + other.value)
|
||||
|
||||
|
||||
from .tree import PackageTreeNode, get_base_dir
|
||||
|
||||
Reference in New Issue
Block a user