def sniff_dot11(mon_iface):
 try:
  sniff(iface=mon_iface, store=0, prn=cb, stop_filter=stopfilter)
 except socket.error as e:
  if (e.errno == 100):
   pass
  else:
   raise

def sniff_dot11 ( mon_iface ) : try : sniff ( iface = mon_iface , store = 0 , prn = cb , stop_filter = stopfilter ) except socket . error as e : if ( e . errno == 100 ) : pass else : raise
we need this here to run it from a thread .