_rC = { 0: None # osinfo.py 'osFamily' } def _resetCache() -> bool: try: for x in _rC: x = None return True except IndexError as e: from warnings import warn warn('IndexError was unusually thrown whilst clearing cache ({}). ignoring it...'.format(e.message)) return True except: return False def _reload(): import osinfo _rC[0]=osinfo.getOSValue('osFamily') def getAll() -> dict: return { 'os': { 'family': _rC[0] } }