|
|
@ -338,11 +338,11 @@ class TimeBot: |
|
|
|
method = "punch_out" |
|
|
|
method = "punch_out" |
|
|
|
elif last_punch[0]["entryNumber"] == PunchCodes.LEAVING.value: |
|
|
|
elif last_punch[0]["entryNumber"] == PunchCodes.LEAVING.value: |
|
|
|
self.logger.error("your last entry was `punch_out`... punching in again with this command is not supported") |
|
|
|
self.logger.error("your last entry was `punch_out`... punching in again with this command is not supported") |
|
|
|
sys.exit(1) |
|
|
|
raise Exception("your last entry was `punch_out`... punching in again with this command is not supported") |
|
|
|
if method is None: |
|
|
|
if method is None: |
|
|
|
self.logger.error("hit an unknown situation... detection failed; run with `-v` for more info") |
|
|
|
self.logger.error("hit an unknown situation... detection failed; run with `-v` for more info") |
|
|
|
self.logger.debug(f"last entry was: {last_punch}") |
|
|
|
self.logger.debug(f"last entry was: {last_punch}") |
|
|
|
exit(1) |
|
|
|
raise Exception("hit an unknown situation... method detection failed;") |
|
|
|
self.logger.info("running `{}` with date `{}` and time `{}`".format( |
|
|
|
self.logger.info("running `{}` with date `{}` and time `{}`".format( |
|
|
|
method, |
|
|
|
method, |
|
|
|
punch_datetime.strftime(DateFormats.SIMPLE_DATE.value), |
|
|
|
punch_datetime.strftime(DateFormats.SIMPLE_DATE.value), |
|
|
|