Blame SOURCES/python3-syntax-fixes.patch

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