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>