[SUCS Devel] [Git][sucs/accountmanager][master] Become more 'production' ready and help setup debug related stuff

Imran Hussain imranh at sucs.org
Sat Mar 9 16:24:15 GMT 2019


Imran Hussain pushed to branch master at sucs / accountmanager


Commits:
227424e1 by Imran Hussain at 2019-03-09T16:23:28Z
Become more 'production' ready and help setup debug related stuff

- - - - -


1 changed file:

- sucsam.py


Changes:

=====================================
sucsam.py
=====================================
@@ -85,7 +85,8 @@ def sendReminderEmail(listofpeeps):
 			smtpConn = smtplib.SMTP('localhost')
 			smtpConn.sendmail(sender, receiver, message.as_string())
 			smtpConn.quit()
-			sys.exit(0)
+			if debugmode > 0: #only send out one email instead of 85464684164864165
+				sys.exit(0)
 		else:
 			print("Renewal email template not found!")
 			sys.exit(4)
@@ -169,7 +170,8 @@ def reminderMenu():
 	print("Double check https://sucs.org/Admin/SU that everyone that has paid to renew has been marked as renwed. This tool doesn't do that job yet!")
 	print("")
 	print("1. View a list of accounts that aren't marked as renewed in the DB")
-	print("2. Semd email to all students reminding them to renew")
+	print("2 Semd email to all reminding them to renew")
+	print("2.1 Semd email to all students reminding them to renew")
 	print("0. Return to main menu")
 
 	option = input("Option: ")
@@ -184,6 +186,10 @@ def reminderMenu():
 		reminderMenu()
 	if (option == "2"):
 		sendReminderEmail(studentsBad)
+		sendReminderEmail(societiesBad)
+		sendReminderEmail(associatesBad)
+	if (option == "2.1"):
+		sendReminderEmail(studentsBad)
 	if (option == "0"):
 		mainMenu()
 	else:
@@ -194,6 +200,7 @@ def deleteMenu(deleteArray):
 	print("1. View list of accounts to be deleted")
 	print("2. Add/delete users from delete list")
 	print("3. Auto populate list of users to be deleted")
+	print("3.1 Just add student accounts")
 	print("9. Do the delete")
 	print("0. Go back to main menu")
 	
@@ -221,7 +228,14 @@ def deleteMenu(deleteArray):
 		for soc in societiesBad:
 			print("Adding " + str(soc[0]) + " to the list because the DB says: " + str(soc[1]) )
 			deleteArray.append(soc[0])
+		for ass in associatesBad:
+			print("Adding " + str(ass[0]) + " to the list because the DB says: " + str(ass[1]) )
+			deleteArray.append(ass[0])
 		deleteMenu(deleteArray)
+	elif (option == "3.1"):
+		for student in studentsBad:
+			print("Adding " + str(student[0]) + " to the list because the DB says: " + str(student[1]) )
+			deleteArray.append(student[0])
 	elif (option == "9"):
 		print("Nope not yet")
 		deleteMenu(deleteArray)



View it on GitLab: https://projects.sucs.org/sucs/accountmanager/commit/227424e19844eae027b51902265b5408ed59cf43

-- 
View it on GitLab: https://projects.sucs.org/sucs/accountmanager/commit/227424e19844eae027b51902265b5408ed59cf43
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20190309/e02e2926/attachment-0001.html>


More information about the Devel mailing list