Skip to content

Commit 6ba1392

Browse files
committed
test: drop SO_PASSCRED python2 workaround
1 parent c2b9882 commit 6ba1392

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/systemd/test/test_daemon.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,7 @@ def test_notify_with_socket(tmpdir):
331331
sock.bind(path)
332332
except socket.error as e:
333333
pytest.xfail('failed to bind socket (%s)' % e)
334-
# SO_PASSCRED is not defined in python2.7
335-
SO_PASSCRED = getattr(socket, 'SO_PASSCRED', 16)
336-
sock.setsockopt(socket.SOL_SOCKET, SO_PASSCRED, 1)
334+
sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)
337335
os.environ['NOTIFY_SOCKET'] = path
338336

339337
assert notify('READY=1')

0 commit comments

Comments
 (0)