新增get_git_username功能
This commit is contained in:
parent
ca58acf66b
commit
0cb82eb577
|
|
@ -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):
|
def connect(hostname,port,username,pwd,db):
|
||||||
mydb = mysql.connector.connect(host = hostname, port = port, user = username, password = pwd, database = db)
|
mydb = mysql.connector.connect(host = hostname, port = port, user = username, password = pwd, database = db)
|
||||||
return mydb
|
return mydb
|
||||||
|
|
|
||||||
Reference in New Issue