Просмотр исходного кода

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.
Daniel Martí 10 лет назад
Родитель
Сommit
60b2d18d81
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      lib/chutney/TorNet.py

+ 3 - 0
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