def _workout_filename(filename):
 if (os.path.isfile(filename) or (filename == '/')):
  if (filename == '/'):
   filename = None
  return filename
 else:
  return _workout_filename(os.path.dirname(filename))

def _workout_filename ( filename ) : if ( os . path . isfile ( filename ) or ( filename == '/' ) ) : if ( filename == '/' ) : filename = None return filename else : return _workout_filename ( os . path . dirname ( filename ) )
recursively workout the file name from an augeas change .