GIT_MISSING message, thanks Niphlod
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.0 (2012-08-24 23:47:44) dev
|
Version 2.00.0 (2012-08-25 11:17:34) dev
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ try:
|
|||||||
have_git = True
|
have_git = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
have_git = False
|
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,
|
from gluon.languages import (regex_language, read_possible_languages,
|
||||||
read_possible_plurals, lang_sampling,
|
read_possible_plurals, lang_sampling,
|
||||||
@@ -223,6 +223,7 @@ def site():
|
|||||||
if (form_update.vars.url or '').endswith('.git'):
|
if (form_update.vars.url or '').endswith('.git'):
|
||||||
if not have_git:
|
if not have_git:
|
||||||
session.flash = GIT_MISSING
|
session.flash = GIT_MISSING
|
||||||
|
redirect(URL(r=request))
|
||||||
target = os.path.join(apath(r=request),form_update.vars.name)
|
target = os.path.join(apath(r=request),form_update.vars.name)
|
||||||
try:
|
try:
|
||||||
new_repo = Repo.clone_from(form_update.vars.url,target)
|
new_repo = Repo.clone_from(form_update.vars.url,target)
|
||||||
|
|||||||
Reference in New Issue
Block a user