Skip to content

Commit

Permalink
read params
Browse files Browse the repository at this point in the history
  • Loading branch information
AlfredChester committed Dec 21, 2022
1 parent 72b91d5 commit 7e2c833
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/param.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def judgeCppValid(name: str) -> bool:
@logger.catch
class commandConfigs:
ParamData = defaultParamData
@logger.catch
def handleParam(self, index: int) -> None:
pType = paramType[self.argv[index]]
pName = paramName[self.argv[index]]
Expand All @@ -28,12 +29,16 @@ def handleParam(self, index: int) -> None:
else:
self.ParamData[pName] = True

@logger.catch
def checkParamValid(self) -> None:
if not 'src' in self.ParamData:
logger.error("No Input Given. FuckCpp terminated")
exit(0)

@logger.catch
def __init__(self) -> None:
if len(argv) == 1 or (len(argv) == 2 and 'python' in argv[0]):
functionMap['help']()
self.argc = len(argv)
self.argv = argv
jumpInLoop = False
Expand Down

0 comments on commit 7e2c833

Please sign in to comment.