0

Provide some better errors messages to the user.

If the c_overviewer module is present but will not import, provide a
different error than if the modules doesn't exist at all.

Also, added a new mechanism to force users to re-build their extension
if needed (see the top of overviewer.h)
This commit is contained in:
Andrew Chin
2011-03-30 21:29:10 -04:00
parent 1ff6783e35
commit 744a65f1e2
4 changed files with 46 additions and 3 deletions

View File

@@ -34,11 +34,14 @@ def get_program_path():
def findGitVersion():
if os.path.exists(".git"):
with open(os.path.join(".git","HEAD")) as f:
this_dir = get_program_path()
if os.path.exists(os.path.join(this_dir,".git")):
with open(os.path.join(this_dir,".git","HEAD")) as f:
data = f.read().strip()
if data.startswith("ref: "):
with open(os.path.join(".git", data[5:])) as g:
if not os.path.exists(os.path.join(this_dir,data[5:])):
return data
with open(os.path.join(this_dir, ".git", data[5:])) as g:
return g.read().strip()
else:
return data