From 3bf854078976eaeb552d0d241353fc066c97d3b0 Mon Sep 17 00:00:00 2001 From: Rohan Kishore <109947257+rohankishore@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:00:11 +0530 Subject: [PATCH] Update __init__.py Exception handling for importing Git. --- biscuit/core/components/git/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/biscuit/core/components/git/__init__.py b/biscuit/core/components/git/__init__.py index 7656da0f..15ea7af0 100644 --- a/biscuit/core/components/git/__init__.py +++ b/biscuit/core/components/git/__init__.py @@ -1,6 +1,9 @@ -import git - -from .repo import GitRepo +from tkinter import messagebox +try: + import git + from .repo import GitRepo +except ImportError: + messagebox.showerror("Git not found", "Git is not installed on your PC. Install Git and add Git to the PATH to use Biscuit") class Git(git.Git):