def _GetConsoleUser():
  logging.warning('facter primary_user empty; fetching from sys_config')
  if OBJC_OK:
    # this returns a tuple of (username, uid, gid)
    # if no console user is logged in, it'll be (None, 0, 0)
    return sys_config.SCDynamicStoreCopyConsoleUser(None, None, None)[0] or ''
  else:
    return None
Helper to load config defaults in same way across core and extensions
dataset/ETHPy150Open google/simian/src/simian/mac/client/flight_common.py/_GetConsoleUser--crossover with--dataset/ETHPy150Open mopidy/mopidy/mopidy/config/__init__.py/read