Skip to content

Commit

Permalink
Refactor script_path and programs in cvise.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
marxin committed Apr 29, 2020
1 parent 96ba667 commit 99a7004
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions cvise.py
Original file line number Diff line number Diff line change
@@ -31,8 +31,9 @@ def format(self, record):
record.delta = duration.strftime("%H:%M:%S")
return super().format(record)

script_path = os.path.dirname(os.path.realpath(__file__))

def get_share_dir():
script_path = os.path.dirname(os.path.realpath(__file__))

# Test all known locations for the cvise directory
share_dirs = [
@@ -46,16 +47,14 @@ def get_share_dir():

raise CViseError("Cannot find cvise module directory!")


programs = {
"clang_delta" : "clang_delta",
"clex" : "clex",
"topformflat" : "delta" ,
"unifdef" : None,
}

def find_external_programs():
script_path = os.path.dirname(os.path.realpath(__file__))
programs = {
"clang_delta" : "clang_delta",
"clex" : "clex",
"topformflat" : "delta" ,
"unifdef" : None,
}

for prog, local_folder in programs.items():
path = None
if local_folder:

0 comments on commit 99a7004

Please sign in to comment.