Commit da8189cd authored by 孙 楠's avatar 孙 楠

update to python3

parent 47d095af
Pipeline #1970 canceled with stages
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
if [ -n "$AUTO_LOGIN_HOME" ] ; then if [ -n "$AUTO_LOGIN_HOME" ] ; then
# sleep 2 # sleep 2
. "$AUTO_LOGIN_HOME/config" . "$AUTO_LOGIN_HOME/config"
token=$(python "$AUTO_LOGIN_HOME/onetimepass.py") token=$(python3 "$AUTO_LOGIN_HOME/onetimepass.py")
# echo ${token} # echo ${token}
expectlogin.sh ${username} ${password} ${host} ${token} expectlogin.sh ${username} ${password} ${host} ${token}
else else
echo "AUTO_LOGIN_HOME not config" echo "AUTO_LOGIN_HOME not config"
. config . config
token=$(python onetimepass.py) token=$(python3 onetimepass.py)
./expectlogin.sh ${username} ${password} ${host} ${token} ./expectlogin.sh ${username} ${password} ${host} ${token}
fi fi
\ No newline at end of file
...@@ -127,5 +127,5 @@ def main(): ...@@ -127,5 +127,5 @@ def main():
config = parse_config('config') config = parse_config('config')
my_secret = config['secret'] my_secret = config['secret']
my_token = get_totp(my_secret) my_token = get_totp(my_secret)
print my_token print(my_token)
main() main()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment