mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix OS X version detection on Mavericks
OS X: Fix system tray notifications causing crashes on some OS X 10.9 (Mavericks) systems (those that had Growl installed at some point). See #1224491 (Calibre Crashes on Mac OS X Mavericks)
This commit is contained in:
parent
7fc33c08f4
commit
849fd5dbeb
@ -52,7 +52,10 @@ def get_osx_version():
|
||||
from collections import namedtuple
|
||||
OSX = namedtuple('OSX', 'major minor tertiary')
|
||||
try:
|
||||
_osx_ver = OSX(*(map(int, platform.mac_ver()[0].split('.'))))
|
||||
ver = platform.mac_ver()[0].split('.')
|
||||
if len(ver) == 2:
|
||||
ver.append(0)
|
||||
_osx_ver = OSX(*(map(int, ver)))
|
||||
except:
|
||||
_osx_ver = OSX(0, 0, 0)
|
||||
return _osx_ver
|
||||
|
Loading…
x
Reference in New Issue
Block a user