GIT_MISSING message, thanks Niphlod

This commit is contained in:
mdipierro
2012-08-25 11:17:39 -05:00
parent da2083ee36
commit 54b9e4126d
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-08-24 23:47:44) dev
Version 2.00.0 (2012-08-25 11:17:34) dev
+2 -1
View File
@@ -20,7 +20,7 @@ try:
have_git = True
except ImportError:
have_git = False
GIT_MISSING = 'requires python-git module, but not installed'
GIT_MISSING = 'requires python-git module, but not installed or incompatible version'
from gluon.languages import (regex_language, read_possible_languages,
read_possible_plurals, lang_sampling,
@@ -223,6 +223,7 @@ def site():
if (form_update.vars.url or '').endswith('.git'):
if not have_git:
session.flash = GIT_MISSING
redirect(URL(r=request))
target = os.path.join(apath(r=request),form_update.vars.name)
try:
new_repo = Repo.clone_from(form_update.vars.url,target)