You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
542 B
Python
28 lines
542 B
Python
_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]
|
|
}
|
|
}
|
|
|