Skip to content

Commit

Permalink
Access Log added
Browse files Browse the repository at this point in the history
  • Loading branch information
kanehekili authored and kanehekili committed Feb 29, 2024
1 parent d12c0ff commit 41d1c83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
11 changes: 8 additions & 3 deletions src/TsvAccessModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,18 @@ def verifyAccess(self, rfid):
if rfid:
if rfid in self.eastereggs:
Log.info("Master check %s",rfid)
if self.ledCounter:
self.ledCounter.text("CHEF")
if self.ledCounter:
self.ledCounter.text("CHEF")
Log.info("Displayed CHEF")
Log.info("Test connection")
self.db.ensureConnection()
if self.db.isConnected():
Log.info("Test connection OK")
self.gate.welcome1()
else:
self.gate.signalAlarm()
self.gate.signalAlarm()
Log.warning("Test connection FAILS")
Log.info("Master check done")
return
#rfid & paysection must fit ->if section in PREPAID-> decrease count
ps = Konfig.asDBString(self.configData.allPaySections())
Expand Down
10 changes: 5 additions & 5 deletions src/test/Scrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,19 +426,19 @@ def nextDay():

def sendEmail():
port = 587 # For starttls
smtp_server = "w00d4ed3.kasserver.com"
password = "TSV1847#MS"
smtp_server = "myServer"
password = "mypwd"

msg = EmailMessage()
msg['Subject'] = "Sauna Abo"
msg['From'] = "[email protected]"
msg['To'] = "[email protected]"
msg['From'] = "sender"
msg['To'] = "receip"
msg.set_content("Mitglied %s hat 10 Sauna Punkte gekauft"%("Hugo"))

context = ssl.create_default_context()
with smtplib.SMTP(smtp_server, port) as server:
server.starttls(context=context)
server.login("[email protected]", password)
server.login("sender", password)
server.send_message(msg)


Expand Down

0 comments on commit 41d1c83

Please sign in to comment.