moved import to the top
This commit is contained in:
@@ -34,6 +34,7 @@ import logging.handlers
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
import stat
|
||||||
|
|
||||||
import nova
|
import nova
|
||||||
from nova import flags
|
from nova import flags
|
||||||
@@ -258,7 +259,6 @@ class NovaRootLogger(NovaLogger):
|
|||||||
self.addHandler(self.filelog)
|
self.addHandler(self.filelog)
|
||||||
self.logpath = logpath
|
self.logpath = logpath
|
||||||
|
|
||||||
import stat
|
|
||||||
st = os.stat(self.logpath)
|
st = os.stat(self.logpath)
|
||||||
if st.st_mode != (stat.S_IFREG | FLAGS.logfile_mode):
|
if st.st_mode != (stat.S_IFREG | FLAGS.logfile_mode):
|
||||||
os.chmod(self.logpath, FLAGS.logfile_mode)
|
os.chmod(self.logpath, FLAGS.logfile_mode)
|
||||||
|
|||||||
Reference in New Issue
Block a user