In mb/asn.py the port in socket.getaddrinfo must not be 0 on #135

Closed
poeml opened this Issue Jun 5, 2015 · 0 comments

Comments

Projects
None yet
1 participant
Owner

poeml commented Jun 5, 2015

                                                                                 [          ]

Issue migrated (2015-06-05) from old issue tracker http://mirrorbrain.org/issues/issue135

Title    In mb/asn.py the port in socket.getaddrinfo must not be 0 on
              Solaris
 Priority   urgent              Status        resolved
Superseder                     Nosy List      dagobert, poeml
Assigned To poeml              Keywords

msg470 (view) Author: dagobert Date: 2014-01-23.17:31:06

In mb/asn.py the resolution is done with

      try:
          for res in socket.getaddrinfo(s, 0):
              af, socktype, proto, canonname, sa = res

The 0 for the port leads to the exception

socket error msg: [Errno 9] service name not available for the specified socket

type

whereas None instead of 0 works. The error is only present when specifying a fqdn
and is not present when adding explicit ip numbers.

msg471 (view) Author: dagobert Date: 2014-01-23.17:34:30

The test was done on Solaris 10 Sparc with OpenCSW Python 2.7

msg472 (view) Author: poeml Date: 2014-01-23.21:40:36

Hm, None seems to be fine on Linux also

msg473 (view) Author: poeml Date: 2014-01-23.21:43:45

Fixed in trunk
http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8338&view=rev

Thanks, Dago!

History
         Date           User   Action              Args
2014-01-23 21:43:55 poeml    set    status: in-progress -> resolved
2014-01-23 21:43:45 poeml    set    messages: + msg473
                                      status: chatting -> in-progress
2014-01-23 21:40:37 poeml    set    assignedto: poeml
                                      messages: + msg472
                                      nosy: + poeml
2014-01-23 17:34:30 dagobert set    status: unread -> chatting
                                      messages: + msg471
2014-01-23 17:31:07 dagobert create

(end of migrated issue)

@poeml poeml added bug resolved labels Jun 5, 2015

poeml closed this Jun 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment