Fix build error with scons-4.4.0 version which is based on python3
[platform/upstream/iotivity.git] / service / easy-setup / sampleapp / enrollee / tizen-sdb / EnrolleeSample / build / SConscript
index d73e383..8482fef 100644 (file)
@@ -30,8 +30,8 @@ es_target_enrollee_map = {
 
 host = platform.system().lower()
 
-if not host_target_map.has_key(host):
-       print "\nError: Current system (%s) isn't supported\n" % host
+if host not in host_target_map:
+       print("\nError: Current system (%s) isn't supported\n" % host)
        Exit(1)
 
 ######################################################################
@@ -40,7 +40,7 @@ if not host_target_map.has_key(host):
 target_os = ARGUMENTS.get('TARGET_OS', host).lower() # target os
 
 if target_os not in host_target_map[host]:
-       print "\nError: Unknown target os: %s (Allow values: %s)\n" % (target_os, host_target_map[host])
+       print("\nError: Unknown target os: %s (Allow values: %s)\n" % (target_os, host_target_map[host]))
        Exit(1)
 
 default_arch = platform.machine()
@@ -60,7 +60,7 @@ device_name = ARGUMENTS.get('DEVICE_NAME', "OIC-DEVICE")
 es_target_enrollee = ARGUMENTS.get('ES_TARGET_ENROLLEE')
 
 if es_target_enrollee not in es_target_enrollee_map:
-       print "\nError: Unknown ES_TARGET_ENROLLEE: %s (Allow values: %s)\n" % (es_target_enrollee, es_target_enrollee_map)
+       print("\nError: Unknown ES_TARGET_ENROLLEE: %s (Allow values: %s)\n" % (es_target_enrollee, es_target_enrollee_map))
        Exit(1)
 
 
@@ -143,7 +143,7 @@ if target_os in targets_support_cc:
                env.AppendUnique(LINKFLAGS = ['--sysroot=' + sys_root])
 
        if prefix or tc_path:
-               print tc_set_msg
+               print(tc_set_msg)
 
 # Ensure scons be able to change its working directory
 env.SConscriptChdir(1)
@@ -158,12 +158,12 @@ env.SConscriptChdir(1)
 
 def __set_dir(env, dir):
        if not os.path.exists(dir + '/SConstruct'):
-               print '''
+               print('''
 *************************************** Error *********************************
 * The directory(%s) seems isn't a source code directory, no SConstruct file is
 * found. *
 *******************************************************************************
-''' % dir
+''' % dir)
                Exit(1)
 
        if env.get('RELEASE'):