minor fixes for running on windows.
This commit is contained in:
parent
a448fc43ae
commit
eb440dff36
4 changed files with 15 additions and 3 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -25,7 +25,9 @@
|
||||||
"copyts",
|
"copyts",
|
||||||
"cronsim",
|
"cronsim",
|
||||||
"datas",
|
"datas",
|
||||||
|
"dateparser",
|
||||||
"daterange",
|
"daterange",
|
||||||
|
"defusedxml",
|
||||||
"dotenv",
|
"dotenv",
|
||||||
"edgechromium",
|
"edgechromium",
|
||||||
"engineio",
|
"engineio",
|
||||||
|
|
@ -56,6 +58,7 @@
|
||||||
"movflags",
|
"movflags",
|
||||||
"mpegts",
|
"mpegts",
|
||||||
"msvideo",
|
"msvideo",
|
||||||
|
"multidict",
|
||||||
"muxdelay",
|
"muxdelay",
|
||||||
"nodesc",
|
"nodesc",
|
||||||
"noprogress",
|
"noprogress",
|
||||||
|
|
|
||||||
|
|
@ -539,7 +539,7 @@ class Config:
|
||||||
try:
|
try:
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
branch_result = subprocess.run( # noqa: S603
|
branch_result = subprocess.run(
|
||||||
["git", "rev-parse", "--abbrev-ref", "HEAD"], # noqa: S607
|
["git", "rev-parse", "--abbrev-ref", "HEAD"], # noqa: S607
|
||||||
cwd=os.path.dirname(git_path),
|
cwd=os.path.dirname(git_path),
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
|
|
@ -556,7 +556,7 @@ class Config:
|
||||||
logging.warning("Git branch name is empty.")
|
logging.warning("Git branch name is empty.")
|
||||||
return
|
return
|
||||||
|
|
||||||
commit_result = subprocess.run( # noqa: S603
|
commit_result = subprocess.run(
|
||||||
["git", "log", "-1", "--format=%ct_%H"], # noqa: S607
|
["git", "log", "-1", "--format=%ct_%H"], # noqa: S607
|
||||||
cwd=os.path.dirname(git_path),
|
cwd=os.path.dirname(git_path),
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,14 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import io
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
os.environ["PYTHONUTF8"] = "1"
|
||||||
|
|
||||||
|
if "utf-8" != sys.stdout.encoding.lower():
|
||||||
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
|
||||||
|
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding="utf-8")
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
APP_ROOT = str((Path(__file__).parent / "..").resolve())
|
APP_ROOT = str((Path(__file__).parent / "..").resolve())
|
||||||
|
|
@ -8,7 +17,6 @@ if APP_ROOT not in sys.path:
|
||||||
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import queue
|
import queue
|
||||||
import socket
|
import socket
|
||||||
import threading
|
import threading
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,7 @@ ignore = [
|
||||||
"ERA001",
|
"ERA001",
|
||||||
"S101",
|
"S101",
|
||||||
"LOG015",
|
"LOG015",
|
||||||
|
"PLC0415",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Allow fix for all enabled rules (when `--fix`) is provided.
|
# Allow fix for all enabled rules (when `--fix`) is provided.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue