mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2025-01-09 17:33:47 +00:00
fixed venv typo
This commit is contained in:
parent
11e400c892
commit
a8f6a44c45
2 changed files with 3 additions and 2 deletions
|
@ -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:
|
||||||
```
|
```
|
||||||
|
|
3
demo.py
3
demo.py
|
@ -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}')
|
||||||
|
|
Loading…
Reference in a new issue