Skip to content

Commit b6e76ea

Browse files
committed
catch 'AUR packag not exists' error when submitting to AUR
1 parent e7df53c commit b6e76ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lilac2/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def _aur_exists(pkgbase: str) -> bool:
362362

363363
def _update_aur_repo_real(pkgbase: str) -> None:
364364
if not _aur_exists(pkgbase):
365-
raise Exception('AUR package not exists, not updating!', pkgbase)
365+
raise LookupError('AUR package not exists, not updating!', pkgbase)
366366

367367
aurpath = const.AUR_REPO_DIR / pkgbase
368368
if not aurpath.is_dir():
@@ -421,7 +421,7 @@ def update_aur_repo() -> None:
421421
pkgbase = os.path.basename(os.getcwd())
422422
try:
423423
_update_aur_repo_real(pkgbase)
424-
except subprocess.CalledProcessError as e:
424+
except (subprocess.CalledProcessError, LookupError) as e:
425425
l10n = intl.get_l10n('mail')
426426
_G.repo.send_error_report(
427427
_G.mod,

0 commit comments

Comments
 (0)