Skip to content

Commit f404796

Browse files
jellybehrmann
authored andcommitted
Fix split does not exists on string error
`string.split()` was removed in Python 3.0.
1 parent 4fa446e commit f404796

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

varlink/server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import socket
55
import stat
6-
import string
76
from socketserver import BaseServer, StreamRequestHandler, ThreadingMixIn
87

98
from .error import InterfaceNotFound, InvalidParameter, MethodNotImplemented, VarlinkEncoder, VarlinkError
@@ -305,7 +304,7 @@ def get_listen_fd():
305304
except OSError:
306305
return None
307306

308-
fields = string.split(os.environ["LISTEN_FDNAMES"], ":")
307+
fields = os.environ.get("LISTEN_FDNAMES", "").split(":")
309308

310309
if len(fields) != fds:
311310
return None

0 commit comments

Comments
 (0)