Its better to have _LOG_PATH than _CWD

This commit is contained in:
Andrew Hamilton 2015-12-15 00:49:56 +00:00
parent 22611b6444
commit 47378715d0

4
vigil
View file

@ -63,12 +63,12 @@ import termstr
import tools
_CWD = os.getcwd()
_LOG_PATH = os.path.join(os.getcwd(), "vigil.log")
def _log_error(message=None):
message = traceback.format_exc() if message is None else message + "\n"
with open(os.path.join(_CWD, "vigil.log"), "a") as log_file:
with open(_LOG_PATH, "a") as log_file:
log_file.write(message)