def get_crashinfo_dir(host):
 host_resultdir = getattr(getattr(host, 'job', None), 'resultdir', None)
 if host_resultdir:
  infodir = host_resultdir
 else:
  infodir = os.path.abspath(os.getcwd())
 infodir = os.path.join(infodir, ('crashinfo.%s' % host.hostname))
 if (not os.path.exists(infodir)):
  os.mkdir(infodir)
 return infodir

def get_crashinfo_dir ( host ) : host_resultdir = getattr ( getattr ( host , 'job' , None ) , 'resultdir' , None ) if host_resultdir : infodir = host_resultdir else : infodir = os . path . abspath ( os . getcwd ( ) ) infodir = os . path . join ( infodir , ( 'crashinfo.%s' % host . hostname ) ) if ( not os . path . exists ( infodir ) ) : os . mkdir ( infodir ) return infodir
find and if necessary create a directory to store crashinfo in .