handle of ModuleNotFoundError

This commit is contained in:
spla 2022-08-03 09:10:20 +02:00
pare 700ad081b4
commit 67e239ebad
S'han modificat 2 arxius amb 8 adicions i 2 eliminacions

Veure arxiu

@ -8,7 +8,10 @@ import os
import sys
import os.path
import psycopg2
try:
from prettytable import PrettyTable
except ModuleNotFoundError as mod_not_found:
print(f"{mod_not_found}. Run 'pip install -r requirements.txt' and try again")
def get_user(email):

Veure arxiu

@ -2,7 +2,10 @@ import os
import sys
from datetime import datetime, timezone, timedelta
import time
try:
import psycopg2
except ModuleNotFoundError as mod_not_found:
print(f"{mod_not_found}'. Run 'pip install -r requirements.txt' and try again")
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import smtplib