1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-11-24 05:48:53 +01:00

Introduce GitObsRuntimeError exception and use it where appropriate

This commit is contained in:
2025-10-09 09:54:18 +02:00
parent 4fddb4568a
commit 1488f3b873
5 changed files with 11 additions and 3 deletions

View File

@@ -60,6 +60,7 @@ class GiteaModel:
def get_editor() -> List[str]:
import shutil
import shlex
from .exceptions import GitObsRuntimeError
editor = os.getenv("EDITOR", None)
if editor:
@@ -80,7 +81,7 @@ def get_editor() -> List[str]:
break
if not editor_path:
raise RuntimeError(f"Unable to start editor '{candidates[0]}'")
raise GitObsRuntimeError(f"Unable to start editor '{candidates[0]}'")
res = [editor_path]
if args: