Blame SOURCES/python3-syntax-fixes.patch

05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsExportHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsExportHandler.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsExportHandler.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsExportHandler.py	2018-10-08 12:36:31.868765636 +0200
05afe3
@@ -52,8 +52,8 @@
05afe3
                             if not filename == None:
05afe3
                                 self.exportInstanceToFile(result,filename)
05afe3
                             else:
05afe3
-                                print 'Filename is needed'
05afe3
-                    except Exception,e:
05afe3
+                                print('Filename is needed')
05afe3
+                    except Exception as e:
05afe3
                         print(e)
05afe3
     def _optimizeResult(self,result):
05afe3
         keys = result.keys()
05afe3
@@ -81,9 +81,9 @@
05afe3
         fp = open(fileName,'w')
05afe3
         try :
05afe3
             fp.write(json.dumps(result,indent=4))
05afe3
-            print "success"
05afe3
+            print("success")
05afe3
         except IOError:
05afe3
-            print "Error: can\'t find file or read data"
05afe3
+            print("Error: can\'t find file or read data")
05afe3
         finally:
05afe3
             fp.close()
05afe3
 			
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsImportHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsImportHandler.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsImportHandler.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsImportHandler.py	2018-10-08 12:36:53.882358851 +0200
05afe3
@@ -16,7 +16,7 @@
05afe3
         if keyValues.has_key('--filename') and len(keyValues['--filename']) > 0:
05afe3
             filename = keyValues['--filename'][0]
05afe3
         else:
05afe3
-            print "A profile is needed! please use \'--filename\' and add the profile name."
05afe3
+            print("A profile is needed! please use \'--filename\' and add the profile name.")
05afe3
         return filename
05afe3
 
05afe3
     def getInstanceCount(self,keyValues):
05afe3
@@ -25,7 +25,7 @@
05afe3
             if  keyValues['--instancecount'][0].isdigit() and int(keyValues['--instancecount'][0]) >= 0:
05afe3
                 count = keyValues['--instancecount'][0]
05afe3
             else:
05afe3
-                print "InstanceCount should be a positive number! The default value(1) will be used!"
05afe3
+                print("InstanceCount should be a positive number! The default value(1) will be used!")
05afe3
         return int(count)
05afe3
     
05afe3
     def getSubOperations(self,cmd,operation):
05afe3
@@ -65,8 +65,8 @@
05afe3
                                     _newkeyValues["RegionId"] = newkeyValues["RegionId"]
05afe3
                                     self._handExtraOperation(cmd,extraOperation,_newkeyValues,version,secureRequest)
05afe3
                                 else:
05afe3
-                                    print "InstanceId  is need!"
05afe3
-                    except Exception,e:
05afe3
+                                    print("InstanceId  is need!")
05afe3
+                    except Exception as e:
05afe3
                         print(e)
05afe3
 
05afe3
     def _handExtraOperation(self,cmd,extraOperation,keyValues,version , secureRequest = False):
05afe3
@@ -81,7 +81,7 @@
05afe3
                         response.display_response("error", result, "json")
05afe3
                     else:
05afe3
                         response.display_response(extraOperation, result, "json")
05afe3
-                except Exception,e:
05afe3
+                except Exception as e:
05afe3
                     print(e)
05afe3
 
05afe3
 
05afe3
@@ -127,7 +127,7 @@
05afe3
             '''
05afe3
             if data.has_key('InstanceId') and len(data['InstanceId']) > 0:
05afe3
                 instanceId = data['InstanceId']
05afe3
-        except Exception,e:
05afe3
+        except Exception as e:
05afe3
             pass
05afe3
         finally:
05afe3
             return instanceId
05afe3
@@ -156,5 +156,5 @@
05afe3
 if __name__ == "__main__":
05afe3
     handler = EcsImportHandler()
05afe3
     handler.getKVFromJson('ttt')
05afe3
-    print handler.getKVFromJson('ttt')
05afe3
+    print(handler.getKVFromJson('ttt'))
05afe3
 
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsExportHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsExportHandler.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsExportHandler.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsExportHandler.py	2018-10-08 12:37:08.373091088 +0200
05afe3
@@ -77,8 +77,8 @@
05afe3
                         if not filename == None:
05afe3
                             self.exportInstanceToFile(result,filename)
05afe3
                         else:
05afe3
-                            print 'Filename is needed'
05afe3
-                except Exception,e:
05afe3
+                            print('Filename is needed')
05afe3
+                except Exception as e:
05afe3
                     print(e)
05afe3
 
05afe3
     def exportInstanceToFile(self, result, filename):
05afe3
@@ -96,9 +96,9 @@
05afe3
         fp = open(fileName,'w')
05afe3
         try :
05afe3
             fp.write(json.dumps(result,indent=4))
05afe3
-            print "success"
05afe3
+            print("success")
05afe3
         except IOError:
05afe3
-            print "Error: can\'t find file or read data"
05afe3
+            print("Error: can\'t find file or read data")
05afe3
         finally:
05afe3
             fp.close()
05afe3
 
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsImportHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsImportHandler.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsImportHandler.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsImportHandler.py	2018-10-08 12:36:20.997966509 +0200
05afe3
@@ -26,7 +26,7 @@
05afe3
                 count = keyValues[import_count][0]
05afe3
             else:
05afe3
                 pass
05afe3
-                # print "InstanceCount should be a positive number! The default value(1) will be used!"
05afe3
+                # print("InstanceCount should be a positive number! The default value(1) will be used!")
05afe3
         return int(count), "InstanceCount is "+str(count)+" created."
05afe3
     
05afe3
     def getSubOperations(self,cmd,operation):
05afe3
@@ -46,7 +46,7 @@
05afe3
                     if self.apiHandler.needSetDefaultRegion(cmdInstance, newkeyValues):
05afe3
                         newkeyValues["RegionId"] = [self.extensionHandler.getUserRegion()]
05afe3
                     newkeyValues["ClientToken"] = [self.random_str()]
05afe3
-                    # print newkeyValues.keys()
05afe3
+                    # print(newkeyValues.keys())
05afe3
                     # return
05afe3
                     # self._setAttr(cmdInstance, newkeyValues) # set all key values in instance
05afe3
                     # self.apiHandler.changeEndPoint(cmdInstance, newkeyValues)
05afe3
@@ -58,7 +58,7 @@
05afe3
                             response.display_response("error", result, "json")
05afe3
                         else:
05afe3
                             response.display_response(item, result, "json")
05afe3
-                    except Exception,e:
05afe3
+                    except Exception as e:
05afe3
                         print(e)
05afe3
    
05afe3
     def getKVFromJson(self,filename):
05afe3
@@ -77,7 +77,7 @@
05afe3
             fp = open(fileName,'r')
05afe3
             data=json.loads(fp.read())
05afe3
             keys = data.keys()
05afe3
-            # print keys, type(data['Items']['DBInstanceAttribute'][0])
05afe3
+            # print(keys, type(data['Items']['DBInstanceAttribute'][0]))
05afe3
             # instanceAttribute = data['Items']['DBInstanceAttribute'][0]
05afe3
             items = data['Items']['DBInstanceAttribute'][0]
05afe3
             keys = items.keys()
05afe3
@@ -130,7 +130,7 @@
05afe3
 if __name__ == "__main__":
05afe3
     handler = RdsImportDBInstanceHandler()
05afe3
     # handler.getKVFromJson('ttt')
05afe3
-    # print handler.getKVFromJson('ttt')
05afe3
-    print handler.random_str()
05afe3
+    # print(handler.getKVFromJson('ttt'))
05afe3
+    print(handler.random_str())
05afe3
 
05afe3
 
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/userProfileHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/userProfileHandler.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/userProfileHandler.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/userProfileHandler.py	2018-10-08 12:11:19.743703469 +0200
05afe3
@@ -24,9 +24,9 @@
05afe3
                 _value = keyValues[ProfileCmd.name][0] # use the first value
05afe3
                 self.extensionCliHandler.setUserProfile(_value)
05afe3
             else:
05afe3
-                print "Do your forget profile name? please use \'--name\' and add the profile name."
05afe3
+                print("Do your forget profile name? please use \'--name\' and add the profile name.")
05afe3
         else:
05afe3
-            print "[", cmd, "] is not right, do you mean "+ProfileCmd.useProfile+" ?"
05afe3
+            print("[", cmd, "] is not right, do you mean "+ProfileCmd.useProfile+" ?")
05afe3
 
05afe3
     def addProfileCmd(self, cmd, keyValues):
05afe3
         userKey = ''
05afe3
@@ -52,12 +52,12 @@
05afe3
                 finally:
05afe3
                     f.close()
05afe3
         else:
05afe3
-            print "[", cmd, "] is not right, do you mean "+ProfileCmd.addProfile+" ?"
05afe3
+            print("[", cmd, "] is not right, do you mean "+ProfileCmd.addProfile+" ?")
05afe3
 
05afe3
 
05afe3
 if __name__ == "__main__":
05afe3
     handler = ProfileHandler()
05afe3
     handler.handleProfileCmd("useprofile", {'--name':["profile444"]})
05afe3
-    print handler.extensionCliHandler.getUserProfile()
05afe3
+    print(handler.extensionCliHandler.getUserProfile())
05afe3
     handler.addProfileCmd("addProfile", {})
05afe3
-    handler.addProfileCmd("addProfile", {'--name':["profile2222"]})
05afe3
\ No newline at end of file
05afe3
+    handler.addProfileCmd("addProfile", {'--name':["profile2222"]})
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliHelp.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliHelp.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliHelp.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliHelp.py	2018-10-08 12:12:25.602486634 +0200
05afe3
@@ -24,14 +24,14 @@
05afe3
         self.openApiDataHandler = aliyunOpenApiData.aliyunOpenApiDataHandler()
05afe3
 
05afe3
     def showUsage(self):
05afe3
-        print "usage: aliyuncli <command> <operation> [options and parameters]"
05afe3
+        print("usage: aliyuncli <command> <operation> [options and parameters]")
05afe3
 
05afe3
     def showExample(self):
05afe3
-        print "show example"
05afe3
+        print("show example")
05afe3
 
05afe3
     def showCmdError(self, cmd):
05afe3
         self.showUsage()
05afe3
-        print "<aliyuncli> the valid command as follows:\n"
05afe3
+        print("<aliyuncli> the valid command as follows:\n")
05afe3
         cmds = self.openApiDataHandler.getApiCmds()
05afe3
         self.printAsFormat(cmds)
05afe3
 
05afe3
@@ -44,7 +44,7 @@
05afe3
                 error.printInFormat("Wrong version", "The sdk version is not exit.")
05afe3
                 return None
05afe3
         self.showUsage()
05afe3
-        print "["+cmd+"]","valid operations as follows:\n"
05afe3
+        print("["+cmd+"]","valid operations as follows:\n")
05afe3
         operations = self.openApiDataHandler.getApiOperations(cmd, version)
05afe3
         extensions = self.openApiDataHandler.getExtensionOperationsFromCmd(cmd)
05afe3
         operations.update(extensions)
05afe3
@@ -56,8 +56,8 @@
05afe3
         self.printAsFormat(operations)
05afe3
 
05afe3
     def showParameterError(self, cmd, operation, parameterlist):
05afe3
-        print 'usage: aliyuncli <command> <operation> [options and parameters]'
05afe3
-        print '['+cmd+"."+operation+']: current operation can uses parameters as follow :\n'
05afe3
+        print('usage: aliyuncli <command> <operation> [options and parameters]')
05afe3
+        print('['+cmd+"."+operation+']: current operation can uses parameters as follow :\n')
05afe3
         self.printAsFormat(parameterlist)
05afe3
         pass
05afe3
 
05afe3
@@ -72,7 +72,7 @@
05afe3
             tmpList.append(item)
05afe3
             count = count+1
05afe3
             if len(tmpList) == 2:
05afe3
-                print '{0:40}'.format(tmpList[0]),'\t|',format(tmpList[1],'<10')
05afe3
+                print('{0:40}'.format(tmpList[0]),'\t|',format(tmpList[1],'<10'))
05afe3
                 tmpList = list()
05afe3
             if len(tmpList) == 1 and count == len(mlist):
05afe3
-                print tmpList[0]
05afe3
\ No newline at end of file
05afe3
+                print(tmpList[0])
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliMain.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliMain.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliMain.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliMain.py	2018-10-08 12:12:42.799168903 +0200
05afe3
@@ -91,7 +91,7 @@
05afe3
                             keyValues["RegionId"] = [self.extensionHandler.getUserRegion()]
05afe3
                         #check necessaryArgs as:accesskeyid accesskeysecret regionId
05afe3
                         if not self.handler.hasNecessaryArgs(keyValues):
05afe3
-                            print 'accesskeyid/accesskeysecret/regionId is absence'
05afe3
+                            print('accesskeyid/accesskeysecret/regionId is absence')
05afe3
                             return
05afe3
                         result = self.handler.getResponse(cmd,operation,className,cmdInstance,keyValues,secureRequest)
05afe3
                         if result is None:
05afe3
@@ -102,7 +102,7 @@
05afe3
                         else:
05afe3
                             response.display_response(operation, result, outPutFormat,keyValues)
05afe3
                     else:
05afe3
-                        print 'aliyuncli internal error, please contact: haowei.yao@alibaba-inc.com'
05afe3
+                        print('aliyuncli internal error, please contact: haowei.yao@alibaba-inc.com')
05afe3
             elif self.handler.isAvailableExtensionOperation(cmd, operation):
05afe3
                 if self.args.__len__() >= 3 and self.args[2] == 'help':
05afe3
                     import commandConfigure
05afe3
@@ -125,7 +125,7 @@
05afe3
     def showInstanceAttribute(self, cmd, operation, classname):
05afe3
         if self.args.__len__() >= 3 and self.args[2] == "help":
05afe3
             self.helper.showParameterError(cmd, operation, self.completer._help_to_show_instance_attribute(classname))
05afe3
-            #print self.completer._help_to_show_instance_attribute(cmdInstance)
05afe3
+            #print(self.completer._help_to_show_instance_attribute(cmdInstance))
05afe3
             return True
05afe3
         return False
05afe3
 
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliParser.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliParser.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliParser.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliParser.py	2018-10-08 12:12:54.764947819 +0200
05afe3
@@ -141,7 +141,7 @@
05afe3
             _key = keyValues[keystr][0]
05afe3
         if keyValues.has_key(secretstr) and keyValues[secretstr].__len__() > 0:
05afe3
             _secret = keyValues[secretstr][0]
05afe3
-        #print "accesskeyid: ", _key , "accesskeysecret: ",_secret
05afe3
+        #print("accesskeyid: ", _key , "accesskeysecret: ",_secret)
05afe3
         return _key, _secret
05afe3
 
05afe3
 
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliUpgrade.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliUpgrade.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliUpgrade.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliUpgrade.py	2018-10-08 12:13:23.672413710 +0200
05afe3
@@ -161,12 +161,12 @@
05afe3
 
05afe3
 if __name__ == "__main__":
05afe3
     upgradeHandler = aliyunCliUpgradeHandler()
05afe3
-    # print upgradeHandler.getLatestTimeFromServer()
05afe3
+    # print(upgradeHandler.getLatestTimeFromServer())
05afe3
     # flag, url = upgradeHandler.isNewVersionReady()
05afe3
     # if flag:
05afe3
-    #     print url
05afe3
+    #     print(url)
05afe3
     # else:
05afe3
-    #     print "current version is latest one"
05afe3
-    # print "final test:"
05afe3
-    print upgradeHandler.checkForUpgrade()
05afe3
-    print upgradeHandler.handleUserChoice("N")
05afe3
+    #     print("current version is latest one")
05afe3
+    # print("final test:")
05afe3
+    print(upgradeHandler.checkForUpgrade())
05afe3
+    print(upgradeHandler.handleUserChoice("N"))
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunExtensionCliHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunExtensionCliHandler.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunExtensionCliHandler.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunExtensionCliHandler.py	2018-10-08 12:14:46.830877248 +0200
05afe3
@@ -127,35 +127,35 @@
05afe3
 
05afe3
 # this api will show help page when user input aliyuncli help(-h or --help)
05afe3
     def showAliyunCliHelp(self):
05afe3
-        print color.bold+"ALIYUNCLI()"+color.end
05afe3
-        print color.bold+"\nNAME"+color.end
05afe3
-        print "\taliyuncli -"
05afe3
-        print color.bold+"\nDESCRIPTION"+color.end
05afe3
-        print "\tThe Aliyun Command Line Interface is a unified tool to manage your aliyun services. "
05afe3
-        print color.bold+"\nSYNOPSIS"+color.end
05afe3
-        print "\taliyuncli <command> <operation> [options and parameters]"
05afe3
-        print "\n\taliyuncli has supported command completion now. The detail you can check our site."
05afe3
-        print color.bold+"OPTIONS"+color.end
05afe3
-        print color.bold+"\tconfigure"+color.end
05afe3
-        print "\n\tThis option will help you save the key and secret and your favorite output format (text, json or table)"
05afe3
-        print color.bold+"\n\t--output"+color.end+" (string)"
05afe3
-        print "\n\tThe formatting style for command output."
05afe3
-        print "\n\to json"
05afe3
-        print "\n\to text"
05afe3
-        print "\n\to table"
05afe3
+        print(color.bold+"ALIYUNCLI()"+color.end)
05afe3
+        print(color.bold+"\nNAME"+color.end)
05afe3
+        print("\taliyuncli -")
05afe3
+        print(color.bold+"\nDESCRIPTION"+color.end)
05afe3
+        print("\tThe Aliyun Command Line Interface is a unified tool to manage your aliyun services. ")
05afe3
+        print(color.bold+"\nSYNOPSIS"+color.end)
05afe3
+        print("\taliyuncli <command> <operation> [options and parameters]")
05afe3
+        print("\n\taliyuncli has supported command completion now. The detail you can check our site.")
05afe3
+        print(color.bold+"OPTIONS"+color.end)
05afe3
+        print(color.bold+"\tconfigure"+color.end)
05afe3
+        print("\n\tThis option will help you save the key and secret and your favorite output format (text, json or table)")
05afe3
+        print(color.bold+"\n\t--output"+color.end+" (string)")
05afe3
+        print("\n\tThe formatting style for command output.")
05afe3
+        print("\n\to json")
05afe3
+        print("\n\to text")
05afe3
+        print("\n\to table")
05afe3
         
05afe3
-        print color.bold+"\n\t--secure"+color.end
05afe3
-        print "\n\tMaking secure requests(HTTPS) to service"
05afe3
+        print(color.bold+"\n\t--secure"+color.end)
05afe3
+        print("\n\tMaking secure requests(HTTPS) to service")
05afe3
         
05afe3
-        print color.bold+"\nAVAILABLE SERVICES"+color.end
05afe3
-        print "\n\to ecs"
05afe3
-        print "\n\to ess"
05afe3
-        print "\n\to mts"
05afe3
-        print "\n\to rds"
05afe3
-        print "\n\to slb"
05afe3
+        print(color.bold+"\nAVAILABLE SERVICES"+color.end)
05afe3
+        print("\n\to ecs")
05afe3
+        print("\n\to ess")
05afe3
+        print("\n\to mts")
05afe3
+        print("\n\to rds")
05afe3
+        print("\n\to slb")
05afe3
 
05afe3
     def showCurrentVersion(self):
05afe3
-        print self._version
05afe3
+        print(self._version)
05afe3
 
05afe3
     def findConfigureFilePath(self):
05afe3
         homePath = ""
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunOpenApiData.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunOpenApiData.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunOpenApiData.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunOpenApiData.py	2018-10-08 12:16:00.008525187 +0200
05afe3
@@ -39,9 +39,9 @@
05afe3
 
05afe3
 
05afe3
 def oss_notice():
05afe3
-    print "OSS operation in aliyuncli is not supported."
05afe3
-    print "Please use 'ossutil' command line tool for Alibaba Cloud OSS operation."
05afe3
-    print "You can find information about 'ossutil' here: https://github.com/aliyun/ossutil.\n"
05afe3
+    print("OSS operation in aliyuncli is not supported.")
05afe3
+    print("Please use 'ossutil' command line tool for Alibaba Cloud OSS operation.")
05afe3
+    print("You can find information about 'ossutil' here: https://github.com/aliyun/ossutil.\n")
05afe3
 
05afe3
     
05afe3
 try:
05afe3
@@ -391,22 +391,22 @@
05afe3
             return jsonobj
05afe3
         
05afe3
         except ImportError as e:
05afe3
-            print module, 'is not exist!'
05afe3
+            print(module, 'is not exist!')
05afe3
             sys.exit(1)            
05afe3
 
05afe3
         except ServerException as e:
05afe3
             error = cliError.error()
05afe3
             error.printInFormat(e.get_error_code(), e.get_error_msg())
05afe3
-            print "Detail of Server Exception:\n"
05afe3
-            print str(e)
05afe3
+            print("Detail of Server Exception:\n")
05afe3
+            print(str(e))
05afe3
             sys.exit(1)
05afe3
         
05afe3
         except ClientException as e:            
05afe3
-            # print e.get_error_msg()
05afe3
+            # print(e.get_error_msg())
05afe3
             error = cliError.error()
05afe3
             error.printInFormat(e.get_error_code(), e.get_error_msg())
05afe3
-            print "Detail of Client Exception:\n"
05afe3
-            print str(e)
05afe3
+            print("Detail of Client Exception:\n")
05afe3
+            print(str(e))
05afe3
             sys.exit(1)
05afe3
 
05afe3
     def getSetFuncs(self,classname):
05afe3
@@ -549,6 +549,6 @@
05afe3
 
05afe3
 if __name__ == '__main__':
05afe3
     handler = aliyunOpenApiDataHandler()
05afe3
-    print "###############",handler.isAvailableExtensionOperation('ecs', 'exportInstance')
05afe3
-    print "###############",handler.isAvailableOperation('ecs', 'DescribeInstances')
05afe3
-    print "###############",handler.getExtensionOperationsFromCmd('ecs')
05afe3
+    print("###############",handler.isAvailableExtensionOperation('ecs', 'exportInstance'))
05afe3
+    print("###############",handler.isAvailableOperation('ecs', 'DescribeInstances'))
05afe3
+    print("###############",handler.getExtensionOperationsFromCmd('ecs'))
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunSdkConfigure.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunSdkConfigure.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunSdkConfigure.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunSdkConfigure.py	2018-10-08 12:16:14.865250686 +0200
05afe3
@@ -44,7 +44,7 @@
05afe3
             filename=self.fileName
05afe3
             self.writeCmdVersionToFile(cmd,version,filename)
05afe3
         else:
05afe3
-            print "A argument is needed! please use \'--version\' and add the sdk version."
05afe3
+            print("A argument is needed! please use \'--version\' and add the sdk version.")
05afe3
             return
05afe3
     def showVersions(self,cmd,operation,stream=None):
05afe3
         configureVersion='(not configure)'
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/commandConfigure.py b/bundled/aliyun/aliyun-cli/aliyuncli/commandConfigure.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/commandConfigure.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/commandConfigure.py	2018-10-08 12:17:34.763774477 +0200
05afe3
@@ -55,7 +55,7 @@
05afe3
                 # _mlist = self.rds.extensionOptions[self.rds.exportDBInstance]
05afe3
                 self.appendList(parameterList, self.rds.extensionOptions[self.rds.exportDBInstance])
05afe3
             if operation.lower() == self.rds.importDBInstance.lower():
05afe3
-                # print "haha", (self.rds.extensionOptions[self.rds.importDBInstance])
05afe3
+                # print("haha", (self.rds.extensionOptions[self.rds.importDBInstance]))
05afe3
                 # parameterList.append(self.rds.extensionOptions[self.rds.importDBInstance])
05afe3
                 self.appendList(parameterList, self.rds.extensionOptions[self.rds.importDBInstance])
05afe3
 
05afe3
@@ -89,8 +89,8 @@
05afe3
                         importInstance:['count','filename']}
05afe3
 
05afe3
 if __name__ == '__main__':
05afe3
-    # print type(rds.extensionOperations)
05afe3
-    # print type(rds.extensionOptions)
05afe3
-    # print rds.extensionOptions['ll']
05afe3
+    # print(type(rds.extensionOperations))
05afe3
+    # print(type(rds.extensionOptions))
05afe3
+    # print(rds.extensionOptions['ll'])
05afe3
     configure = commandConfigure()
05afe3
-    print configure.showExtensionOperationHelp("ecs", "ExportInstance")
05afe3
+    print(configure.showExtensionOperationHelp("ecs", "ExportInstance"))
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/configure.py b/bundled/aliyun/aliyun-cli/aliyuncli/configure.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/configure.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/configure.py	2018-10-08 12:17:59.282322043 +0200
05afe3
@@ -577,7 +577,7 @@
05afe3
                 operation = operations[i].strip()
05afe3
                 self._getKeyFromSection(profilename,operation)
05afe3
         else:
05afe3
-            print 'The correct usage:aliyuncli configure get key --profile profilename'
05afe3
+            print('The correct usage:aliyuncli configure get key --profile profilename')
05afe3
             return
05afe3
 
05afe3
     def _getKeyFromSection(self,profilename,key):
05afe3
@@ -591,7 +591,7 @@
05afe3
         elif key in _WRITE_TO_CONFIG_FILE :
05afe3
             self._getKeyFromFile(config_filename,sectionName,key)
05afe3
         else:
05afe3
-            print key,'=','None'
05afe3
+            print(key,'=','None')
05afe3
     def _getKeyFromFile(self,filename,section,key):
05afe3
         if  os.path.isfile(filename):
05afe3
             with open(filename, 'r') as f:
05afe3
@@ -600,9 +600,9 @@
05afe3
                 start =  self._configWriter.hasSectionName(section,contents)[1]
05afe3
                 end = self._configWriter._getSectionEnd(start,contents)
05afe3
                 value = self._configWriter._getValueInSlice(start,end,key,contents)
05afe3
-                print key,'=',value
05afe3
+                print(key,'=',value)
05afe3
         else:
05afe3
-            print key,'=None'
05afe3
+            print(key,'=None')
05afe3
 
05afe3
 
05afe3
 
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/handleEndPoint.py b/bundled/aliyun/aliyun-cli/aliyuncli/handleEndPoint.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/handleEndPoint.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/handleEndPoint.py	2018-10-08 12:18:25.178844179 +0200
05afe3
@@ -2,7 +2,7 @@
05afe3
 
05afe3
 def handleEndPoint(cmd,operation,keyValues):
05afe3
     if not hasNecessaryArgs(keyValues):
05afe3
-        print 'RegionId/EndPoint is absence'
05afe3
+        print('RegionId/EndPoint is absence')
05afe3
         return
05afe3
     if cmd is not None:
05afe3
         cmd = cmd.capitalize()
05afe3
@@ -25,7 +25,7 @@
05afe3
         from aliyunsdkcore.profile.region_provider import modify_point
05afe3
         modify_point(cmd,regionId,endPoint)
05afe3
     except Exception as e:
05afe3
-        print e
05afe3
+        print(e)
05afe3
         pass
05afe3
 
05afe3
 
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/oasadp/oasHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/oasadp/oasHandler.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/oasadp/oasHandler.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/oasadp/oasHandler.py	2018-10-08 12:18:45.458469966 +0200
05afe3
@@ -111,14 +111,14 @@
05afe3
     if os.path.isfile(cfgfile):
05afe3
         ans = raw_input('File existed. Do you wish to overwrite it?(y/n)')
05afe3
         if ans.lower() != 'y':
05afe3
-            print 'Answer is No. Quit now'
05afe3
+            print('Answer is No. Quit now')
05afe3
             return
05afe3
     with open(cfgfile, 'w+') as f:
05afe3
         config.write(f)
05afe3
-    print 'Your configuration is saved to %s.' % cfgfile
05afe3
+    print('Your configuration is saved to %s.' % cfgfile)
05afe3
 
05afe3
 def cmd_help(args):
05afe3
-    print HELP
05afe3
+    print(HELP)
05afe3
 
05afe3
 def add_config(parser):
05afe3
     parser.add_argument('--host', type=str, help='service host')
05afe3
@@ -161,7 +161,7 @@
05afe3
     return CMD_LIST.keys()
05afe3
 def handleOas(pars=None):
05afe3
     if  pars is None:
05afe3
-        print HELP
05afe3
+        print(HELP)
05afe3
         sys.exit(0)
05afe3
     parser = ArgumentParser(prog="aliyuncli oas",formatter_class=ArgumentDefaultsHelpFormatter)
05afe3
 
05afe3
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/paramOptimize.py b/bundled/aliyun/aliyun-cli/aliyuncli/paramOptimize.py
05afe3
--- a/bundled/aliyun/aliyun-cli/aliyuncli/paramOptimize.py	2018-01-24 04:08:33.000000000 +0100
05afe3
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/paramOptimize.py	2018-10-08 12:18:59.713206928 +0200
05afe3
@@ -61,7 +61,7 @@
05afe3
             data = f.read()
05afe3
             return data
05afe3
     except (OSError, IOError) as e:
05afe3
-        print e
05afe3
+        print(e)
05afe3
 def _getParamFromUrl(prefix,value,mode):
05afe3
 
05afe3
     req = urllib2.Request(value)
05afe3
@@ -74,7 +74,7 @@
05afe3
             errorMsg='Get the wrong content'
05afe3
             errorClass.printInFormat(response.getcode(), errorMsg)
05afe3
     except Exception as e:
05afe3
-        print e
05afe3
+        print(e)
05afe3
 
05afe3
 PrefixMap = {'file://': _getParamFromFile,
05afe3
              'fileb://': _getParamFromFile
05afe3
@@ -86,4 +86,4 @@
05afe3
              'fileb://': {'mode': 'rb'},
05afe3
              #'http://': {},
05afe3
              #'https://': {}
05afe3
-            }
05afe3
\ No newline at end of file
05afe3
+            }
05afe3
diff -uNr a/bundled/aliyun/colorama/demos/demo07.py b/bundled/aliyun/colorama/demos/demo07.py
05afe3
--- a/bundled/aliyun/colorama/demos/demo07.py	2015-01-06 11:41:47.000000000 +0100
05afe3
+++ b/bundled/aliyun/colorama/demos/demo07.py	2018-10-08 12:20:25.598622106 +0200
05afe3
@@ -16,10 +16,10 @@
05afe3
     3a4
05afe3
     """
05afe3
     colorama.init()
05afe3
-    print "aaa"
05afe3
-    print "aaa"
05afe3
-    print "aaa"
05afe3
-    print forward() + up(2) + "b" + up() + back(2) + "1" + forward() + "2" + back(3) + down(2) + "3" + forward() + "4"
05afe3
+    print("aaa")
05afe3
+    print("aaa")
05afe3
+    print("aaa")
05afe3
+    print(forward() + up(2) + "b" + up() + back(2) + "1" + forward() + "2" + back(3) + down(2) + "3" + forward() + "4")
05afe3
 
05afe3
 
05afe3
 if __name__ == '__main__':
05afe3
diff -uNr a/bundled/aliyun/pycryptodome/Doc/conf.py b/bundled/aliyun/pycryptodome/Doc/conf.py
05afe3
--- a/bundled/aliyun/pycryptodome/Doc/conf.py	2018-07-10 21:32:46.000000000 +0200
05afe3
+++ b/bundled/aliyun/pycryptodome/Doc/conf.py	2018-10-08 12:08:11.122188094 +0200
05afe3
@@ -15,7 +15,7 @@
05afe3
 
05afe3
 # Modules to document with autodoc are in another directory
05afe3
 sys.path.insert(0, os.path.abspath('../lib'))
05afe3
-print sys.path
05afe3
+print(sys.path)
05afe3
 
05afe3
 # Mock existance of native modules
05afe3
 from Crypto.Util import _raw_api
05afe3
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/Math/Primality.py b/bundled/aliyun/pycryptodome/lib/Crypto/Math/Primality.py
05afe3
--- a/bundled/aliyun/pycryptodome/lib/Crypto/Math/Primality.py	2018-07-10 21:32:46.000000000 +0200
05afe3
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/Math/Primality.py	2018-10-08 12:08:11.123188075 +0200
05afe3
@@ -302,7 +302,7 @@
05afe3
     randfunc = kwargs.pop("randfunc", None)
05afe3
     prime_filter = kwargs.pop("prime_filter", lambda x: True)
05afe3
     if kwargs:
05afe3
-        print "Unknown parameters:", kwargs.keys()
05afe3
+        print("Unknown parameters:", kwargs.keys())
05afe3
 
05afe3
     if exact_bits is None:
05afe3
         raise ValueError("Missing exact_bits parameter")
05afe3
@@ -341,7 +341,7 @@
05afe3
     exact_bits = kwargs.pop("exact_bits", None)
05afe3
     randfunc = kwargs.pop("randfunc", None)
05afe3
     if kwargs:
05afe3
-        print "Unknown parameters:", kwargs.keys()
05afe3
+        print("Unknown parameters:", kwargs.keys())
05afe3
 
05afe3
     if randfunc is None:
05afe3
         randfunc = Random.new().read
05afe3
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/PublicKey/ECC.py b/bundled/aliyun/pycryptodome/lib/Crypto/PublicKey/ECC.py
05afe3
--- a/bundled/aliyun/pycryptodome/lib/Crypto/PublicKey/ECC.py	2018-07-10 21:32:46.000000000 +0200
05afe3
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/PublicKey/ECC.py	2018-10-08 12:08:11.124188057 +0200
05afe3
@@ -912,4 +912,4 @@
05afe3
     count = 30
05afe3
     for x in xrange(count):
05afe3
         _ = point * d
05afe3
-    print (time.time() - start) / count * 1000, "ms"
05afe3
+    print((time.time() - start) / count * 1000, "ms")
05afe3
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_AES.py b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_AES.py
05afe3
--- a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_AES.py	2018-07-10 21:32:46.000000000 +0200
05afe3
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_AES.py	2018-10-08 12:08:11.124188057 +0200
05afe3
@@ -1276,7 +1276,7 @@
05afe3
         tests += make_block_tests(AES, "AESNI", test_data, {'use_aesni': True})
05afe3
         tests += [ TestMultipleBlocks(True) ]
05afe3
     else:
05afe3
-        print "Skipping AESNI tests"
05afe3
+        print("Skipping AESNI tests")
05afe3
     return tests
05afe3
 
05afe3
 if __name__ == '__main__':
05afe3
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_GCM.py b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_GCM.py
05afe3
--- a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_GCM.py	2018-07-10 21:32:46.000000000 +0200
05afe3
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_GCM.py	2018-10-08 12:08:11.125188038 +0200
05afe3
@@ -894,7 +894,7 @@
05afe3
         if config.get('slow_tests'):
05afe3
             tests += list_test_cases(NISTTestVectorsGCM_no_clmul)
05afe3
     else:
05afe3
-        print "Skipping test of PCLMULDQD in AES GCM"
05afe3
+        print("Skipping test of PCLMULDQD in AES GCM")
05afe3
 
05afe3
     return tests
05afe3
 
05afe3
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py
05afe3
--- a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py	2018-07-10 21:32:46.000000000 +0200
05afe3
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py	2018-10-08 12:08:11.125188038 +0200
05afe3
@@ -39,7 +39,7 @@
05afe3
     """Convert a text string with bytes in hex form to a byte string"""
05afe3
     clean = b(rws(t))
05afe3
     if len(clean)%2 == 1:
05afe3
-        print clean
05afe3
+        print(clean)
05afe3
         raise ValueError("Even number of characters expected")
05afe3
     return a2b_hex(clean)
05afe3
 
05afe3
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/__main__.py b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/__main__.py
05afe3
--- a/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/__main__.py	2018-07-10 21:32:46.000000000 +0200
05afe3
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/SelfTest/__main__.py	2018-10-08 12:08:11.126188020 +0200
05afe3
@@ -25,11 +25,11 @@
05afe3
 
05afe3
 slow_tests = not "--skip-slow-tests" in sys.argv
05afe3
 if not slow_tests:
05afe3
-    print "Skipping slow tests"
05afe3
+    print("Skipping slow tests")
05afe3
 
05afe3
 wycheproof_warnings = "--wycheproof-warnings" in sys.argv
05afe3
 if wycheproof_warnings:
05afe3
-    print "Printing Wycheproof warnings"
05afe3
+    print("Printing Wycheproof warnings")
05afe3
 
05afe3
 config = {'slow_tests' : slow_tests, 'wycheproof_warnings' : wycheproof_warnings }
05afe3
 SelfTest.run(stream=sys.stdout, verbosity=1, config=config)
05afe3
diff -uNr a/bundled/aliyun/pycryptodome/lib/Crypto/Util/RFC1751.py b/bundled/aliyun/pycryptodome/lib/Crypto/Util/RFC1751.py
05afe3
--- a/bundled/aliyun/pycryptodome/lib/Crypto/Util/RFC1751.py	2018-07-10 21:32:46.000000000 +0200
05afe3
+++ b/bundled/aliyun/pycryptodome/lib/Crypto/Util/RFC1751.py	2018-10-08 12:08:11.126188020 +0200
05afe3
@@ -369,13 +369,13 @@
05afe3
            ]
05afe3
 
05afe3
     for key, words in data:
05afe3
-        print 'Trying key', key
05afe3
+        print('Trying key', key)
05afe3
         key=binascii.a2b_hex(key)
05afe3
         w2=key_to_english(key)
05afe3
         if w2!=words:
05afe3
-            print 'key_to_english fails on key', repr(key), ', producing', str(w2)
05afe3
+            print('key_to_english fails on key', repr(key), ', producing', str(w2))
05afe3
         k2=english_to_key(words)
05afe3
         if k2!=key:
05afe3
-            print 'english_to_key fails on key', repr(key), ', producing', repr(k2)
05afe3
+            print('english_to_key fails on key', repr(key), ', producing', repr(k2))