chdir to package before logger starts

This commit is contained in:
petrucci4prez 2017-06-11 20:14:58 -04:00
parent c38c319a16
commit 96d31adff7
1 changed files with 2 additions and 2 deletions

View File

@ -3,6 +3,8 @@
import os, time, signal, traceback, logging
import RPi.GPIO as GPIO
os.chdir(os.path.dirname(os.path.realpath(__file__)))
from sharedLogging import unmountGluster # this should be first program module
from stateMachine import StateMachine
from exceptionThreading import excChildListener, excStopper
@ -25,8 +27,6 @@ def sigtermHandler(signum, stackFrame):
if __name__ == '__main__':
try:
os.chdir(os.path.dirname(os.path.realpath(__file__)))
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)