jw.pkg.App: Remove .debug() and friends

Replace the jw.pkg.App.debug(), .warn() and .err() methods by the
global log() function. There's no obvious benefit in having App know
what's logged.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-01-25 15:18:27 +01:00
commit 95fa2f0d06
8 changed files with 39 additions and 41 deletions

View file

@ -4,8 +4,9 @@ import re, os
from argparse import Namespace, ArgumentParser
from urllib.parse import urlparse
from ..Cmd import Cmd
from ...lib.log import *
from ...lib.util import run_cmd
from ..Cmd import Cmd
class CmdGetAuthInfo(Cmd): # export
@ -25,7 +26,7 @@ class CmdGetAuthInfo(Cmd): # export
# --- Milk jw-pkg repo
jw_pkg_dir = self.app.find_dir('jw-pkg', pretty=False)
if not os.path.isdir(jw_pkg_dir + '/.git'):
self.app.debug(f'jw-pkg directory is not a Git repo: {jw_pkg_dir}')
log(DEBUG, f'jw-pkg directory is not a Git repo: {jw_pkg_dir}')
return
remotes = run_cmd(['git', '-C', jw_pkg_dir, 'remote', '-v'])
result: dict[str, str] = {}