diff --git a/工具v3/database_tools_2.py b/工具v3/database_tools_2.py index 90634ea0..8728caa4 100644 --- a/工具v3/database_tools_2.py +++ b/工具v3/database_tools_2.py @@ -22,6 +22,12 @@ BuildFullScheme = { } } +def get_git_username(): + command = "git config --global user.name" + stream = os.popen(command) + username = stream.read().strip() + return username + def connect(hostname,port,username,pwd,db): mydb = mysql.connector.connect(host = hostname, port = port, user = username, password = pwd, database = db) return mydb