mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 12:51:36 +00:00
MacOS codenames
This commit is contained in:
@@ -810,7 +810,10 @@ def getOSPlatform():
|
|||||||
pltfrm = ' '.join(platform.win32_ver())
|
pltfrm = ' '.join(platform.win32_ver())
|
||||||
elif myos == 'Darwin':
|
elif myos == 'Darwin':
|
||||||
myos = 'MacOS'
|
myos = 'MacOS'
|
||||||
pltfrm = platform.mac_ver()[0]
|
mac_ver = platform.mac_ver()[0]
|
||||||
|
minor_ver = int(pltfrm.split('.')[1]) # pltfrm 10.14.6 == mac_ver 14
|
||||||
|
codename = MACOS_CODENAMES.get(minor_ver, '')
|
||||||
|
pltfrm = ' '.join([codename, mac_ver])
|
||||||
else:
|
else:
|
||||||
pltfrm = platform.platform()
|
pltfrm = platform.platform()
|
||||||
return '%s %s' % (myos, pltfrm)
|
return '%s %s' % (myos, pltfrm)
|
||||||
|
|||||||
13
src/var.py
13
src/var.py
@@ -381,6 +381,19 @@ GOOGLEDOC_VALID_EXTENSIONS_MAP = {
|
|||||||
MIMETYPE_GA_SPREADSHEET: ['.csv', '.ods', '.pdf', '.xlsx', '.zip'],
|
MIMETYPE_GA_SPREADSHEET: ['.csv', '.ods', '.pdf', '.xlsx', '.zip'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MACOS_CODENAMES = {
|
||||||
|
6: 'Snow Leopard',
|
||||||
|
7: 'Lion',
|
||||||
|
8: 'Mountain Lion',
|
||||||
|
9: 'Mavericks',
|
||||||
|
10: 'Yosemite',
|
||||||
|
11: 'El Capitan',
|
||||||
|
12: 'Sierra',
|
||||||
|
13: 'High Sierra',
|
||||||
|
14: 'Mojave',
|
||||||
|
15: 'Catalina'
|
||||||
|
}
|
||||||
|
|
||||||
_MICROSOFT_FORMATS_LIST = [{'mime': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'ext': '.docx'},
|
_MICROSOFT_FORMATS_LIST = [{'mime': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'ext': '.docx'},
|
||||||
{'mime': 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'ext': '.dotx'},
|
{'mime': 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'ext': '.dotx'},
|
||||||
{'mime': 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'ext': '.pptx'},
|
{'mime': 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'ext': '.pptx'},
|
||||||
|
|||||||
Reference in New Issue
Block a user