lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181211115607.13774-4-alice.ferrazzi@gmail.com>
Date:   Tue, 11 Dec 2018 20:56:03 +0900
From:   Alice Ferrazzi <alice.ferrazzi@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     ast@...nel.org, daniel@...earbox.net, shuah@...nel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Alice Ferrazzi <alice.ferrazzi@...il.com>
Subject: [PATCH 3/7] selftest/bpf: PEP 8: multiple statements on one line (colon)

Reformat the file for fixing PEP 8 style

Signed-off-by: Alice Ferrazzi <alice.ferrazzi@...il.com>
---
 tools/testing/selftests/bpf/tcp_client.py | 13 +++++++++----
 tools/testing/selftests/bpf/tcp_server.py | 16 +++++++++++-----
 2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/tools/testing/selftests/bpf/tcp_client.py b/tools/testing/selftests/bpf/tcp_client.py
index ad3de27cd605..31f022bf06fa 100755
--- a/tools/testing/selftests/bpf/tcp_client.py
+++ b/tools/testing/selftests/bpf/tcp_client.py
@@ -11,17 +11,22 @@ def read(sock, n):
     buf = b''
     while len(buf) < n:
         rem = n - len(buf)
-        try: s = sock.recv(rem)
-        except (socket.error) as e: return b''
+        try:
+            s = sock.recv(rem)
+        except (socket.error) as e:
+            return b''
         buf += s
     return buf
 
+
 def send(sock, s):
     total = len(s)
     count = 0
     while count < total:
-        try: n = sock.send(s)
-        except (socket.error) as e: n = 0
+        try:
+            n = sock.send(s)
+        except (socket.error) as e:
+            n = 0
         if n == 0:
             return count
         count += n
diff --git a/tools/testing/selftests/bpf/tcp_server.py b/tools/testing/selftests/bpf/tcp_server.py
index f7491517cc49..af79210249af 100755
--- a/tools/testing/selftests/bpf/tcp_server.py
+++ b/tools/testing/selftests/bpf/tcp_server.py
@@ -13,17 +13,22 @@ def read(sock, n):
     buf = b''
     while len(buf) < n:
         rem = n - len(buf)
-        try: s = sock.recv(rem)
-        except (socket.error) as e: return b''
+        try:
+            s = sock.recv(rem)
+        except (socket.error) as e:
+            return b''
         buf += s
     return buf
 
+
 def send(sock, s):
     total = len(s)
     count = 0
     while count < total:
-        try: n = sock.send(s)
-        except (socket.error) as e: n = 0
+        try:
+            n = sock.send(s)
+        except (socket.error) as e:
+            n = 0
         if n == 0:
             return count
         count += n
@@ -42,7 +47,8 @@ HostName = socket.gethostname()
 serverSocket = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
 host = socket.gethostname()
 
-try: serverSocket.bind((host, 0))
+try:
+    serverSocket.bind((host, 0))
 except socket.error as msg:
     print('bind fails: ' + str(msg))
 
-- 
2.19.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ