File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -262,15 +262,12 @@ def run(self):
262262 raise EnvironmentError (1 , "nmap is not installed or could "
263263 "not be found in system path" )
264264
265- thread_stream = ''
266265 while self .__nmap_proc .poll () is None :
267- for streamline in iter (self .__nmap_proc .stdout .readline , b'' ):
268- if streamline is not None :
269- thread_stream = str (streamline .decode ())
270- self .__stdout += thread_stream
271- evnt = self .__process_event (thread_stream )
272- if self .__nmap_event_callback and evnt :
273- self .__nmap_event_callback (self )
266+ for streamline in iter (self .__nmap_proc .stdout .readline , '' ):
267+ self .__stdout += streamline
268+ evnt = self .__process_event (streamline )
269+ if self .__nmap_event_callback and evnt :
270+ self .__nmap_event_callback (self )
274271
275272 self .__stderr += str (self .__nmap_proc .stderr .read ().decode ())
276273
You can’t perform that action at this time.
0 commit comments