Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sockets and Sendmail
#3
It looks like the socket "s" you get from writables is not in message_queues dictionary.
Are you sure it is?

For best practice protect all this dictionary[key] calls with:

if key in dictionary:
  # stuff
else:
  # log/print error
EDIT: I'm also not sure it's wise to use a socket as a dictionary key, though I'm sure it's possible.
Reply


Messages In This Thread
Sockets and Sendmail - by taintedsushi - Aug-27-2019, 12:44 PM
RE: Sockets and Sendmail - by taintedsushi - Aug-28-2019, 04:14 PM
RE: Sockets and Sendmail - by venquessa - Sep-02-2019, 12:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sockets interferring with USB ? epif18 0 2,707 Mar-19-2021, 07:45 PM
Last Post: epif18
  Just learning sockets etc... floatingshed 2 2,397 May-06-2020, 09:37 PM
Last Post: floatingshed
  Quick sockets question... ptrivino 2 2,296 Sep-26-2019, 08:51 PM
Last Post: ptrivino
  Script Conversion 2.7 to 3 (sockets) Pumpernickel 1 2,593 Apr-10-2019, 04:26 PM
Last Post: Pumpernickel
  What sort of things can I write to learn about sockets marienbad 2 2,757 Oct-16-2018, 04:02 PM
Last Post: buran
  unix domain sockets Skaperen 8 5,089 Sep-02-2018, 07:02 PM
Last Post: Skaperen
  file transfer with sockets sinister88 1 6,495 Nov-11-2017, 03:29 PM
Last Post: heiner55
  Trouble with sending raw sockets IronReign 2 4,262 Jun-01-2017, 08:26 AM
Last Post: camp0
  Silly Sockets Jarvis 2 4,268 Feb-20-2017, 01:43 PM
Last Post: Jarvis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020