Switch to preferred Python method for checking sys.platform 25/20925/4
authorMats Wichmann <mats@linux.com>
Thu, 4 May 2017 16:01:07 +0000 (10:01 -0600)
committerZiran Sun <ziran.sun@samsung.com>
Mon, 26 Jun 2017 13:32:06 +0000 (13:32 +0000)
commitc91f52658a256c5a63c6aa86f5de78b1c0832b83
tree2280342fff5652fefa9ad2608a06dc2b07bdcb9d
parent02f3175ee0502fe7ee26e57d7f87507123418087
Switch to preferred Python method for checking sys.platform

Older Pythons can set linux or linux2 in sys.platform.
The suffix is meaningless, deprecated, and no longer happens as of Python 3.3.
The preferred idiom (from Python docs) is:

    if sys.platform.startswith('linux'):

Twiddled a few other things, "imports at the top" rule,
and a couple of related error msgs, and a few strings

In a few places, more could have been done to clean up, but skipped
to keep the patches small

Change-Id: Iccdfa9eb77ff4bc1429e3b38837a8732455a5dfd
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19641
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit 39f1ec664b3abc4e9d58b48a2e281a66ef11a153)
Reviewed-on: https://gerrit.iotivity.org/gerrit/20925
Reviewed-by: Ossama Othman <ossama.othman@intel.com>
extlibs/android/ndk/SConscript
extlibs/arduino/SConscript
extlibs/boost/SConscript
resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/SConscript
service/easy-setup/sampleapp/enrollee/arduino/SConscript