File: 001-fix-test-auto-socket.patch

package info (click to toggle)
lexicon 3.21.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 72,684 kB
  • sloc: python: 20,075; sh: 94; makefile: 11
file content (15 lines) | stat: -rw-r--r-- 445 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Author: Michel Le Bihan <michel@lebihan.pl>
Subject: Close socket in auto test

--- a/tests/providers/test_auto.py
+++ b/tests/providers/test_auto.py
@@ -29,7 +29,8 @@
 # Guys, are we online ?
 def _there_is_no_network():
     try:
-        socket.create_connection(("www.google.com", 80))
+        conn = socket.create_connection(("www.google.com", 80))
+        conn.close()
         return False
     except (OSError, IOError):
         pass