[tor-commits] [stem/master] Replace no-op lambda with function

atagar at torproject.org atagar at torproject.org
Wed Jun 21 17:10:44 UTC 2017


commit 785f28af5601149dc97bda4646444bde314db6e8
Author: Damian Johnson <atagar at torproject.org>
Date:   Tue Jun 20 13:43:48 2017 -0700

    Replace no-op lambda with function
    
    Forgot pycodestyle dislikes lambda assignment. Not sure why but meh, whatever.
---
 stem/descriptor/server_descriptor.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index 499b53e..4e55ee2 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -846,7 +846,8 @@ class RelayDescriptor(ServerDescriptor):
         # of excluding these so we need to mock out part of their internals...
         # ewww.
 
-        no_op = lambda *args, **kwargs: None
+        def no_op(*args, **kwargs):
+          pass
 
         private_signing_key._backend._lib.EVP_PKEY_CTX_set_signature_md = no_op
         private_signing_key._backend.openssl_assert = no_op





More information about the tor-commits mailing list