def check_greenthread_spawns(logical_line, physical_line, filename):
 msg = 'N340: Use nova.utils.%(spawn)s() rather than greenthread.%(spawn)s() and eventlet.%(spawn)s()'
 if (('nova/utils.py' in filename) or ('nova/tests/' in filename)):
  return
 match = re.match(spawn_re, logical_line)
 if match:
  (yield (0, (msg % {'spawn': match.group('spawn_part')})))

def check_greenthread_spawns ( logical_line , physical_line , filename ) : msg = 'N340: Use nova.utils.%(spawn)s() rather than greenthread.%(spawn)s() and eventlet.%(spawn)s()' if ( ( 'nova/utils.py' in filename ) or ( 'nova/tests/' in filename ) ) : return match = re . match ( spawn_re , logical_line ) if match : ( yield ( 0 , ( msg % { 'spawn' : match . group ( 'spawn_part' ) } ) ) )
check for use of greenthread .