fixed venv typo

This commit is contained in:
Steven Burnham 2023-11-15 21:31:42 -05:00
parent 11e400c892
commit a8f6a44c45
No known key found for this signature in database
GPG key ID: D765679712A2FC3D
2 changed files with 3 additions and 2 deletions

View file

@ -37,7 +37,7 @@ mkdir ~/.venv
``` ```
2. Create a virtual environment using Python 3.10: 2. Create a virtual environment using Python 3.10:
``` ```
python3.10 -m pypush ~/.venv python3.10 -m venv ~/.venv/pypush
``` ```
3. Activate the virtual environment: 3. Activate the virtual environment:
``` ```

View file

@ -3,6 +3,7 @@ import logging
import os import os
import threading import threading
import time import time
import traceback
from base64 import b64decode, b64encode from base64 import b64decode, b64encode
from getpass import getpass from getpass import getpass
from cryptography import x509 from cryptography import x509
@ -225,7 +226,7 @@ async def main(args: argparse.Namespace):
reregister_within = 60 # Minutes, time where if expiration time is less than, rereg. reregister_within = 60 # Minutes, time where if expiration time is less than, rereg.
for user in users: for user in users:
if "P:" in str(user.user_id): if "P:" in str(user.user_id):
logging.info(f'The user is: {user}') # logging.info(f'The user is: {user}')
cert = x509.load_pem_x509_certificate(user.id_cert.encode('utf-8')) cert = x509.load_pem_x509_certificate(user.id_cert.encode('utf-8'))
expiration = cert.not_valid_after expiration = cert.not_valid_after
logging.info(f'Certificate expires on: {expiration}') logging.info(f'Certificate expires on: {expiration}')