Remove saved access record validity checks
Since the script already generates valid records, checking their validity
specifically is redundant
Simon Volpert
3 years ago
315 | 315 | record[R_STATUS] = 'expired' |
316 | 316 | record[R_AMOUNT] = 'x' |
317 | 317 | # Check whether payment was received |
318 | if len(record) > 1 and record[R_STATUS] != 'paid': | |
318 | if record[R_STATUS] != 'paid': | |
319 | 319 | record[R_TIME] = timestamp |
320 | 320 | address = record[R_ADDR] |
321 | 321 | new_balance = get_balance(address) |
339 | 339 | # Write to log file |
340 | 340 | write_log(f'{timestamp} -- Payment received of {change} BIT to {address} from {cert_hash} for {request_filename}\n') |
341 | 341 | # Give the client their file |
342 | if len(record) > 1 and record[R_STATUS] == 'paid': | |
342 | if record[R_STATUS] == 'paid': | |
343 | 343 | # Patch mime type definitions with Gemini-specific types |
344 | 344 | mimetypes.add_type('text/gemini', '.gmi', strict=False) |
345 | 345 | # Determine the mime type of the served file |