def init_cachedir(base=None):
 if (base is None):
  base = __opts__['cachedir']
 needed_dirs = (base, os.path.join(base, 'requested'), os.path.join(base, 'active'))
 for dir_ in needed_dirs:
  if (not os.path.exists(dir_)):
   os.makedirs(dir_)
  os.chmod(base, 493)
 return base

def init_cachedir ( base = None ) : if ( base is None ) : base = __opts__ [ 'cachedir' ] needed_dirs = ( base , os . path . join ( base , 'requested' ) , os . path . join ( base , 'active' ) ) for dir_ in needed_dirs : if ( not os . path . exists ( dir_ ) ) : os . makedirs ( dir_ ) os . chmod ( base , 493 ) return base
initialize the cachedir needed for salt cloud to keep track of minions .