From 8bf8e47cd125f1b7844c6229d06857417fd73480 Mon Sep 17 00:00:00 2001 From: RemideZ Date: Tue, 2 Jul 2013 13:52:16 +0200 Subject: [PATCH 1/4] Update __init__.py --- src/bitmessageqt/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index ce477836..fab7e458 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2933,8 +2933,11 @@ def run(): app = QtGui.QApplication(sys.argv) translator = QtCore.QTranslator() - translator.load("translations/bitmessage_" + str(locale.getlocale()[0])) - #translator.load("translations/bitmessage_fr_BE") # Try French instead + try: + translator.load("translations/bitmessage_" + str(locale.getlocale()[0])) + except: + # The above is not compatible with all versions of OSX. + translator.load("translations/bitmessage_en_US") # Default to english. QtGui.QApplication.installTranslator(translator) app.setStyleSheet("QStatusBar::item { border: 0px solid black }") From 8df9dc5731747958d3b40dce59b4ecfc4f70aab2 Mon Sep 17 00:00:00 2001 From: RemideZ Date: Tue, 2 Jul 2013 13:52:55 +0200 Subject: [PATCH 2/4] Update bitmessagemain.py --- src/bitmessagemain.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index c4c2b6db..811bcffd 100644 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -29,6 +29,13 @@ from class_addressGenerator import * import helper_startup import helper_bootstrap +import sys +if sys.platform == 'darwin': + if float( str(sys.version_info[1]) + "." + str(sys.version_info[2])) < 7.5: + print "You should use python 2.7.5 or greater." + print "Your version:", str(sys.version_info[0]) + "." + str(sys.version_info[1]) + "." + str(sys.version_info[2]) + sys.exit(0) + def connectToStream(streamNumber): selfInitiatedConnections[streamNumber] = {} if sys.platform[0:3] == 'win': From 2c8ca6623a1f4fbd6f749c473235a36334db5524 Mon Sep 17 00:00:00 2001 From: RemideZ Date: Tue, 2 Jul 2013 13:53:35 +0200 Subject: [PATCH 3/4] Update openssl.py --- src/pyelliptic/openssl.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pyelliptic/openssl.py b/src/pyelliptic/openssl.py index 09df5ca4..ee75f90a 100644 --- a/src/pyelliptic/openssl.py +++ b/src/pyelliptic/openssl.py @@ -289,7 +289,12 @@ class _OpenSSL: self.HMAC.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p, ctypes.c_void_p] - self.PKCS5_PBKDF2_HMAC = self._lib.PKCS5_PBKDF2_HMAC + try: + self.PKCS5_PBKDF2_HMAC = self._lib.PKCS5_PBKDF2_HMAC + except: + # The above is not compatible with all versions of OSX. + self.PKCS5_PBKDF2_HMAC = self._lib.PKCS5_PBKDF2_HMAC_SHA1 + self.PKCS5_PBKDF2_HMAC.restype = ctypes.c_int self.PKCS5_PBKDF2_HMAC.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p, ctypes.c_int, From 68b235027695d499a3d8779fba1575d094cd8f0e Mon Sep 17 00:00:00 2001 From: RemideZ Date: Tue, 2 Jul 2013 20:25:18 +0200 Subject: [PATCH 4/4] Nicer formatting --- src/bitmessagemain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 811bcffd..4a2071f5 100644 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -31,9 +31,9 @@ import helper_bootstrap import sys if sys.platform == 'darwin': - if float( str(sys.version_info[1]) + "." + str(sys.version_info[2])) < 7.5: + if float( "{1}.{2}".format(*sys.version_info) ) < 7.5: print "You should use python 2.7.5 or greater." - print "Your version:", str(sys.version_info[0]) + "." + str(sys.version_info[1]) + "." + str(sys.version_info[2]) + print "Your version: {0}.{1}.{2}".format(*sys.version_info) sys.exit(0) def connectToStream(streamNumber):