Couldn't find a better way to fix sandbox violation for reaching /var/log/pisi.log
But not a very bad way
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ import pisi.context as ctx
|
||||
|
||||
def init_logging():
|
||||
log_dir = os.path.join(ctx.config.dest_dir(), ctx.config.log_dir())
|
||||
if os.access(log_dir, os.W_OK):
|
||||
if os.access(log_dir, os.W_OK) and not sys.modules.has_key("distutils.core"):
|
||||
handler = logging.handlers.RotatingFileHandler('%s/pisi.log' % log_dir)
|
||||
formatter = logging.Formatter('%(asctime)-12s: %(levelname)-8s %(message)s')
|
||||
handler.setFormatter(formatter)
|
||||
|
||||
Reference in New Issue
Block a user