[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [chutney/master] Keep static analyzers like pyflakes happy about globals



commit 60b2d18d81904e6a71a352dfa8b5cb73f4e04003
Author: Daniel Martí <mvdan@xxxxxxxx>
Date:   Thu Aug 21 17:42:26 2014 +0200

    Keep static analyzers like pyflakes happy about globals
    
    _BASE_ENVIRON and _THE_NETWORK are set programmatically in main(), so static
    analyzers think that they may not always be declared. So declare them as
    global variables at the beginning and we're good.
---
 lib/chutney/TorNet.py |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index 872ff8d..6a1fc8b 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -24,6 +24,9 @@ import time
 import chutney.Templating
 import chutney.Traffic
 
+_BASE_ENVIRON = None
+_THE_NETWORK = None
+
 
 def mkdir_p(d, mode=0777):
     """Create directory 'd' and all of its parents as needed.  Unlike

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits