Skip to content
Snippets Groups Projects
Commit ee9a2a62 authored by Imran Hussain's avatar Imran Hussain
Browse files

Add some colour :)

parent 34b23bc4
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ import codecs
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import ldap
def correctPaidUntilStr():
#same logic as suapi stuff
......@@ -220,8 +221,12 @@ def deleteMenu(deleteArray):
deleteArray.remove(user)
print(str(user) + " won't be deleted.")
else:
deleteArray.append(user)
print(str(user) + " will be deleted.")
try:
pwd.getpwnam(user)
deleteArray.append(user)
print(str(user) + " will be deleted.")
except KeyError:
print("\x1b[1;31mInvalid user.\x1b[0m")
deleteMenu(deleteArray)
elif (option == "3"):
for student in studentsBad:
......@@ -256,7 +261,7 @@ def deleteAccounts():
### MAIN ###
if (os.geteuid() == 0):
print("Don't run this as root!")
print("\x1b[1;31mDon't run this as root!\x1b[0m")
sys.exit(1)
# get some date/time info ready
......@@ -297,5 +302,5 @@ hons = cur.fetchall()
cur.close()
print("Welcome to the SUCS Account Manager!")
print("\x1b[33mWelcome to the SUCS Account Manager!\x1b[0m")
mainMenu()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment