PEP 8 compliance.
This commit is contained in:
parent
b54b865977
commit
218928f033
1 changed files with 22 additions and 19 deletions
|
@ -5,23 +5,26 @@ import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
class Fabricate(dcc.doom_base.WadMap):
|
|
||||||
def get_parser(self, prog_name):
|
|
||||||
parser = super().get_parser(prog_name)
|
|
||||||
parser.add_argument("--fg", action="store_true")
|
|
||||||
return parser
|
|
||||||
|
|
||||||
def take_action(self, parsed_args):
|
class Fabricate(dcc.doom_base.WadMap):
|
||||||
with tempfile.TemporaryDirectory() as td:
|
def get_parser(self, prog_name):
|
||||||
with contextlib.chdir(td):
|
parser = super().get_parser(prog_name)
|
||||||
command = [self.dsda]
|
parser.add_argument("--fg", action="store_true")
|
||||||
if not parsed_args.fg and shutil.which("xvfb-run") is not None:
|
return parser
|
||||||
command = ["xvfb-run"] + command
|
|
||||||
options = []
|
def take_action(self, parsed_args):
|
||||||
for k,v in self._config.get("fabricate_options", {}).items():
|
with tempfile.TemporaryDirectory() as td:
|
||||||
list.append(options, f"{k}={v}")
|
with contextlib.chdir(td):
|
||||||
if len(options) > 0:
|
command = [self.dsda]
|
||||||
options = ["-assign", ",".join(options)]
|
if not parsed_args.fg and shutil.which("xvfb-run") is not None:
|
||||||
subprocess.run(command + self.dsda_preamble() + options +
|
command = ["xvfb-run"] + command
|
||||||
["-timedemo", self.demo_in_path()] +
|
options = []
|
||||||
["-viddump", self.video_path()])
|
for k, v in self._config.get("fabricate_options", {}).items():
|
||||||
|
list.append(options, f"{k}={v}")
|
||||||
|
if len(options) > 0:
|
||||||
|
options = ["-assign", ",".join(options)]
|
||||||
|
subprocess.run(
|
||||||
|
command + self.dsda_preamble() + options
|
||||||
|
+ ["-timedemo", self.demo_in_path()]
|
||||||
|
+ ["-viddump", self.video_path()]
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue