Skip to content

Commit

Permalink
auth-utils: python -> python3 | Make python webserver use unbuffered IO
Browse files Browse the repository at this point in the history
  • Loading branch information
Calvin Winkowski authored and Akianonymus committed Aug 14, 2022
1 parent 6c8eb44 commit c949cc7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions release/bash/gdl
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,8 @@ return 1
fi
{ curl -Is "http://localhost:$server_port_check_refresh_token"&&continue;}||break
done
if command -v python 1>/dev/null&&python -V|grep -q 'Python 3';then
python <<EOF 1>"$TMPFILE.code" 2>&1&
if command -v python3 1>/dev/null&&python -V|grep -q 'Python 3';then
python3 -u <<EOF 1>"$TMPFILE.code" 2>&1&
from http.server import BaseHTTPRequestHandler, HTTPServer
class handler(BaseHTTPRequestHandler):
Expand Down
4 changes: 2 additions & 2 deletions release/sh/gdl
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,8 @@ return 1
fi
{ curl -Is "http://localhost:$server_port_check_refresh_token"&&continue;}||break
done
if command -v python 1>/dev/null&&python -V|grep -q 'Python 3';then
python <<EOF 1>"$TMPFILE.code" 2>&1&
if command -v python3 1>/dev/null&&python -V|grep -q 'Python 3';then
python3 -u <<EOF 1>"$TMPFILE.code" 2>&1&
from http.server import BaseHTTPRequestHandler, HTTPServer
class handler(BaseHTTPRequestHandler):
Expand Down
4 changes: 2 additions & 2 deletions src/common/auth-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ _check_refresh_token() {
done

# https://docs.python.org/3/library/http.server.html
if command -v python 1> /dev/null && python -V | grep -q 'Python 3'; then
python << EOF 1> "${TMPFILE}.code" 2>&1 &
if command -v python3 1> /dev/null && python -V | grep -q 'Python 3'; then
python3 -u << EOF 1> "${TMPFILE}.code" 2>&1 &
from http.server import BaseHTTPRequestHandler, HTTPServer
class handler(BaseHTTPRequestHandler):
Expand Down

0 comments on commit c949cc7

Please sign in to comment.