Move enforce_wrapper() into appropiate CMDs. This speeds up --help as a side effect!

This commit is contained in:
InsanePrawn 2021-09-29 23:18:12 +02:00
parent 18c689f897
commit f3794f939e
11 changed files with 34 additions and 25 deletions

View file

@ -7,6 +7,7 @@ import os
import subprocess
import click
import tempfile
from wrapper import enforce_wrap
BOOTIMG = FLASH_PARTS['BOOTIMG']
LK2ND = FLASH_PARTS['LK2ND']
@ -18,6 +19,7 @@ ROOTFS = FLASH_PARTS['ROOTFS']
@click.argument('what')
@click.argument('location', required=False)
def cmd_flash(what, location):
enforce_wrap()
device, flavour = get_device_and_flavour()
image_name = get_image_name(device, flavour)