Convert db-dump to python3
authorSebastien Douheret <sebastien.douheret@iot.bzh>
Thu, 5 Apr 2018 15:40:22 +0000 (17:40 +0200)
committerSebastien Douheret <sebastien.douheret@iot.bzh>
Thu, 5 Apr 2018 15:40:22 +0000 (17:40 +0200)
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
scripts/sdks/agl/db-dump

index 379be3e..027fdcf 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 #
 #/**************************************************************************
 # * Copyright 2017-2018 IoT.bzh
@@ -46,8 +46,9 @@ SCRIPT_PATH = os.path.dirname(os.path.abspath(
 ENV = subprocess.check_output(
     [os.path.join(SCRIPT_PATH, './_env-init.sh'), '-print']).splitlines()
 
+SDK_ROOT_DIR=None
 for elt in ENV:
-    k, v = elt.split('=', 1)
+    k, v = elt.decode().split('=', 1)
     if k == 'SDK_ROOT_DIR':
         SDK_ROOT_DIR = v.rstrip('/')
     elif k == 'SDK_ENV_SETUP_FILENAME':