handle of ModuleNotFoundError

master
spla 8 months ago
parent 700ad081b4
commit 67e239ebad

@ -8,7 +8,10 @@ import os
import sys
import os.path
import psycopg2
from prettytable import PrettyTable
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):

@ -2,7 +2,10 @@ import os
import sys
from datetime import datetime, timezone, timedelta
import time
import psycopg2
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

Loading…
Cancel
Save