fixed bug where retrieving git id would fail depending on cwd

This commit is contained in:
Jesse Cirimelli-Low 2019-01-03 12:28:29 -08:00
parent c69e5fdb18
commit 53b7e46db4
2 changed files with 12 additions and 21 deletions

View File

@ -510,9 +510,19 @@ class lib:
git_id = 'AAAAAAAAAAAAAAAAAAAA'
else:
with open(os.devnull, 'wb') as devnull:
proc = subprocess.Popen(['git','rev-parse','HEAD'], stdout=subprocess.PIPE)
print(os.path.abspath(os.environ.get("OPENRAM_HOME")) + '/')
proc = subprocess.Popen(['git','rev-parse','HEAD'], cwd=os.path.abspath(os.environ.get("OPENRAM_HOME")) + '/', stdout=subprocess.PIPE)
git_id = str(proc.stdout.read())
git_id = git_id[2:-3]
try:
git_id = git_id[2:-3]
except:
pass
if len(git_id) != 40:
debug.warning("Failed to retrieve git id")
git_id = 'Failed to retruieve'
datasheet = open(OPTS.openram_temp +'/datasheet.info', 'a+')

View File

@ -1,19 +0,0 @@
from flask_table import *
class deliverables(Table):
"""
Set up delivarables table columns and title information
"""
typ = Col('Type')
description = Col('Description')
link = Col('Link')
class deliverables_item(object):
"""
Define deliverables table row elemenent information
"""
def __init__(self, typ, description,link):
self.typ = typ
self.description = description
self.link = link