Fix build error with scons-4.4.0 version which is based on python3
[platform/upstream/iotivity.git] / extlibs / libcoap / SConscript
index 6441a5a..dbcc889 100644 (file)
@@ -51,7 +51,7 @@ libcoap_url              = libcoap_repo_url + '/archive/' + libcoap_branch + '.z
 libcoap_checkout_command = 'git clone ' + libcoap_repo_url + '.git extlibs/libcoap/libcoap --branch ' + libcoap_branch
 
 if with_upstream_libcoap == '1':
-    print '*** Checking for installation of libCoAP ***'
+    print('*** Checking for installation of libCoAP ***')
     if not os.path.exists(libcoap_dir):
         # If the libcoap zip file is not already present, download it
         if not os.path.exists(libcoap_zip_file):
@@ -60,28 +60,28 @@ if with_upstream_libcoap == '1':
             libcoap_zip = libcoap_zip_file
         # Unzip libcoap
         if libcoap_zip and not os.path.exists(os.path.join(libcoap_dir, 'configure')):
-            print 'Unzipping libCoAP'
+            print('Unzipping libCoAP')
             env.UnpackAll(libcoap_dir, libcoap_zip)
         # Rename libcoap
         libcoap_unzip_dir = os.path.join(src_dir, 'extlibs', 'libcoap', 'libcoap-' + libcoap_branch)
         if os.path.exists(os.path.join(libcoap_unzip_dir)):
             os.rename(libcoap_unzip_dir, libcoap_dir)
         if not os.path.exists(os.path.join(libcoap_dir, 'README')):
-            print '''
+            print('''
 *********************************** Error: ****************************************
 * Unable to download and unpack libcoap!                                          *
 * Please download libcoap using the following command:                            *
 *                                                                                 *
 ''' + libcoap_checkout_command + '''
 *                                                                                 *
-***********************************************************************************'''
+***********************************************************************************''')
             Exit()
 else:
-    print '''
+    print('''
 *********************************** Info: *****************************************
 * Using FORKED copy of libCoap located in:                                        *
 * resource/csdk/connectivity/lib/libcoap-4.1.1                                    *
-***********************************************************************************'''
+***********************************************************************************''')
 
 ######################################################################
 # Build libCoAP