From 091959748187b2b452e6a278d287dd592c41a137 Mon Sep 17 00:00:00 2001 From: AndyGrant Date: Tue, 12 Jun 2018 21:33:02 -0400 Subject: [PATCH] Needs to be before the machine.txt read --- Client/OpenBench.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/OpenBench.py b/Client/OpenBench.py index 49927b4..792e490 100644 --- a/Client/OpenBench.py +++ b/Client/OpenBench.py @@ -1,6 +1,9 @@ import ast, argparse, time, sys, platform, multiprocessing import shutil, subprocess, requests, zipfile, os, math, json +# Run from any location ... +os.chdir(os.path.dirname(os.path.abspath(__file__))) + # Argument Parsing ... parser = argparse.ArgumentParser() parser.add_argument('-U', '--username', help='Username', required=True) @@ -35,9 +38,6 @@ except: MACHINE_ID = None print(' Machine unregistered, will register with Server') -# Run from any location ... -os.chdir(os.path.dirname(os.path.abspath(__file__))) - def killProcess(process): if not IS_WINDOWS : os.system('pkill -TERM -P {0}'.format(process.pid)) else : subprocess.call(['taskkill', '/F', '/T', '/PID', str(process.pid)])