Blame SOURCES/python3-syntax-fixes.patch

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