Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion python/submit/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def __str__(self) -> str:

@classmethod
def get_from_str(cls, value: str) -> ConvertMode:
return cls[value.upper()]
try:
return cls[value.upper()]
except KeyError:
raise argparse.ArgumentTypeError(f"无效的转换模式:{value}")

@classmethod
def get_available_values(cls) -> list[ConvertMode]:
Expand Down
Loading