Hack fix for relative import issue.

Alternatives are to use a setup-install util, which is an over-solution
This commit is contained in:
andrew committed 2024-02-15 22:31:56 -05:00
1 parent bb30aab72d
commit 8efe0f919c
2 files changed
+6 -7

No files matched your search

+4 -5
View File
@@ -29,11 +29,10 @@ import sys
# Needed to include from ../Client/*.py # Needed to include from ../Client/*.py
PARENT = os.path.join(os.path.dirname(__file__), os.path.pardir) PARENT = os.path.join(os.path.dirname(__file__), os.path.pardir)
sys.path.append(os.path.abspath(PARENT)) sys.path.append(os.path.abspath(os.path.join(PARENT, 'Client')))
from Client.utils import * from utils import *
from Client.bench import run_benchmark from bench import run_benchmark
from bench_engine import run_benchmark
def get_default_network(args, network): def get_default_network(args, network):
@@ -60,7 +59,7 @@ def get_public_engine(engine, config):
except OpenBenchBuildFailedException as error: except OpenBenchBuildFailedException as error:
print ('Failed to build %s...\n\nCompiler Output:' % (engine)) print ('Failed to build %s...\n\nCompiler Output:' % (engine))
for line in error.message.split('\n'): for line in error.logs.split('\n'):
print ('> %s' % (line)) print ('> %s' % (line))
print () print ()
+2 -2
View File
@@ -26,9 +26,9 @@ import sys
# Needed to include from ../Client/*.py # Needed to include from ../Client/*.py
PARENT = os.path.join(os.path.dirname(__file__), os.path.pardir) PARENT = os.path.join(os.path.dirname(__file__), os.path.pardir)
sys.path.append(os.path.abspath(PARENT)) sys.path.append(os.path.abspath(os.path.join(PARENT, 'Client')))
from Client.bench import run_benchmark from bench import run_benchmark
if __name__ == '__main__': if __name__ == '__main__':