mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-06-26 18:25:36 -04:00
images: repo typo (comma goes tuple), logging/exception handling
This commit is contained in:
parent
f09deaa9a5
commit
becde79172
3 changed files with 6 additions and 5 deletions
|
@ -65,7 +65,8 @@ def create_chroot(
|
||||||
],
|
],
|
||||||
capture_output=True)
|
capture_output=True)
|
||||||
if result.returncode != 0:
|
if result.returncode != 0:
|
||||||
raise Exception('Failed to install chroot:' + result.stdout.decode() + '\n' + result.stderr.decode())
|
logging.debug(result.stdout.decode())
|
||||||
|
raise Exception(f'Failed to install chroot "{chroot_name}":' + '\n' + result.stderr.decode())
|
||||||
return chroot_path
|
return chroot_path
|
||||||
|
|
||||||
|
|
||||||
|
|
2
image.py
2
image.py
|
@ -134,7 +134,7 @@ def cmd_build():
|
||||||
|
|
||||||
packages_dir = config.file['paths']['packages']
|
packages_dir = config.file['paths']['packages']
|
||||||
if os.path.exists(packages_dir):
|
if os.path.exists(packages_dir):
|
||||||
url = f'file://{packages_dir}/$repo',
|
url = f'file://{packages_dir}/$repo'
|
||||||
else:
|
else:
|
||||||
url = 'https://gitlab.com/kupfer/packages/prebuilts/-/raw/main/$repo'
|
url = 'https://gitlab.com/kupfer/packages/prebuilts/-/raw/main/$repo'
|
||||||
extra_repos = {repo: {'Server': url} for repo in REPOSITORIES}
|
extra_repos = {repo: {'Server': url} for repo in REPOSITORIES}
|
||||||
|
|
6
main.py
6
main.py
|
@ -6,10 +6,11 @@ from flash import cmd_flash
|
||||||
from ssh import cmd_ssh
|
from ssh import cmd_ssh
|
||||||
from forwarding import cmd_forwarding
|
from forwarding import cmd_forwarding
|
||||||
from telnet import cmd_telnet
|
from telnet import cmd_telnet
|
||||||
from logger import logging, setup_logging, verbose_option, get_trace
|
from logger import logging, setup_logging, verbose_option
|
||||||
import click
|
import click
|
||||||
from config import config, config_option
|
from config import config, config_option
|
||||||
from wrapper import enforce_wrap, nowrapper_option
|
from wrapper import enforce_wrap, nowrapper_option
|
||||||
|
from traceback import format_exc as get_trace
|
||||||
|
|
||||||
|
|
||||||
@click.group()
|
@click.group()
|
||||||
|
@ -28,8 +29,7 @@ def main():
|
||||||
try:
|
try:
|
||||||
return cli(prog_name='kupferbootstrap')
|
return cli(prog_name='kupferbootstrap')
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
logging.debug(get_trace())
|
logging.fatal(get_trace())
|
||||||
logging.fatal(err)
|
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue