From fdff35e31c17ea648006b2b90a2fae1c944f3e77 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 3 Jan 2016 17:45:49 +0200 Subject: [PATCH] Fix package "shasum" validation on Mac OS X 10.11.2 // Resolve #429 --- HISTORY.rst | 2 ++ docs/installation.rst | 7 ++++--- platformio/downloader.py | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4e99a91c..49d9b12f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -14,6 +14,8 @@ PlatformIO 2.0 development platform * Fixed project generator for CLion IDE (`issue #422 `_) +* Fixed package ``shasum`` validation on Mac OS X 10.11.2 + (`issue #429 `_) 2.7.0 (2015-12-30) ~~~~~~~~~~~~~~~~~~ diff --git a/docs/installation.rst b/docs/installation.rst index de8dedfd..6a593987 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -58,6 +58,10 @@ The latest stable version of PlatformIO may be installed or upgraded via pip install -U platformio +If ``pip`` command is not available run ``easy_install pip`` or use +:ref:`installation_installer_script` which will install ``pip`` and +``platformio`` automatically. + Note that you may run into permissions issues running these commands. You have a few options here: @@ -67,9 +71,6 @@ a few options here: * Run the command in a `virtualenv `_ local to a specific project working set. -If ``pip`` command is not available or you have problems with it try -:ref:`installation_installer_script`. - .. _installation_installer_script: b) Installer Script diff --git a/platformio/downloader.py b/platformio/downloader.py index bb968e57..a64c1a5f 100644 --- a/platformio/downloader.py +++ b/platformio/downloader.py @@ -88,12 +88,12 @@ class FileDownloader(object): try: result = util.exec_command(["sha1sum", self._destination]) dlsha1 = result['out'] - except OSError: + except (OSError, ValueError): try: result = util.exec_command( ["shasum", "-a", "1", self._destination]) dlsha1 = result['out'] - except OSError: + except (OSError, ValueError): pass if dlsha1: