(url)
| 159 | |
| 160 | @staticmethod |
| 161 | def display_code(url): |
| 162 | code, remains, total = get_totp_code(url) |
| 163 | progress = ''.rjust(remains, '=') |
| 164 | progress = progress.ljust(total, ' ') |
| 165 | if os.isatty(0): |
| 166 | print('\r', file=sys.stderr, end='', flush=True) |
| 167 | print('\t{0}\t\t[{1}]'.format(code, progress), file=sys.stderr, end='', flush=True) |
| 168 | else: |
| 169 | if TotpCommand.LastDisplayedCode != code: |
| 170 | print('\t{0}\t\tvalid for {1} seconds.'.format(code, remains)) |
| 171 | TotpCommand.LastDisplayedCode = code |
| 172 | |
| 173 | @staticmethod |
| 174 | def find_endpoints(params): |
no test coverage detected