Skip to content

Commit

Permalink
git: check if installed at all
Browse files Browse the repository at this point in the history
  • Loading branch information
ibressler committed Sep 28, 2020
1 parent fb382bd commit 80e7328
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions git.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ def checkRepo():
if not isRepo("."):
print("Not a GIT repository.")
return
# is git installed?
try:
import git
except ImportError:
print("Could not load git module, is GIT installed and in PATH?")
return
# check for nbstripout
if not isNBstripoutInstalled():
print("nbstripout not found!")
print("Please run the 'Anaconda Update Script'.")
if not isNBstripoutActivated():
print("nbstripout not active in this repo!")
print("Jupyter output will be added to GIT (which is bad).")
# check the repository in detail
try:
import git
except ImportError:
return
from IPython.display import display, HTML
repo = git.Repo('.')
# currentNB = os.path.basename(currentNBpath())
Expand Down

0 comments on commit 80e7328

Please sign in to comment.