Files
Mirko BrombinandKinsteen 01732b1a91 backend: General performance improvements and code cleanup
This commit is the first of many to avoid the back-end rewrite.


* document Result object

* document Diff class

* remove layered env code

* remove Notifications since deprecated

* fix method name (PEP8)

* add convenient method to force kill wineserver when stalled

* use force_f_stalled in runner

* use Result obj in Downloader.download

* handle the Result obj in ComponentManager.download

* code cleanup

* remove old RunnerName type

* remove old note

repositories can now instruct this changes

* code cleanup

* code cleanup

* code cleanup

* code cleanup

* new trailing newline

* extend __validate_template method with essential paths

* code cleanup

* improve offline check

the old method was too slow, the new one just checks the headers with curl, which is much faster

* remove deprecations and old migrations

* fixes #2345

* fix typo

Co-authored-by: Kinsteen <pitiqui69@gmail.com>

* fix exception string

* remove cabextract binary check

since it's already done in health.py

* remove reportMissingImports

useless now since the main package moved from src to bottles

* add PycURL

* replace urllib with pycurl in crucial points

Co-authored-by: Kinsteen <pitiqui69@gmail.com>
2022-12-12 20:23:15 +01:00

31 lines
671 B
Python

from typing import NewType
from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
logging = Logger()
class CMD(WineProgram):
program = "Wine Command Line"
command = "cmd"
def run_batch(
self,
batch: str,
terminal: bool = True,
args: str = "",
environment: dict = None,
cwd: str = None
):
args = f"/c {batch} {args}"
self.launch(
args=args,
communicate=True,
terminal=terminal,
environment=environment,
cwd=cwd,
action_name="run_batch"
)