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:
9
util.py
9
util.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user