[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [nyx/master] Expand relative tor log paths



commit 44f8a618b145dc371b751f1d37e74a8fff258168
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Mar 7 13:24:03 2016 -0800

    Expand relative tor log paths
    
    We have an expand_path() helper so why not use it? We should now expand
    relative tor log paths.
---
 nyx/util/log.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/nyx/util/log.py b/nyx/util/log.py
index f9c95cc..6c5a7b6 100644
--- a/nyx/util/log.py
+++ b/nyx/util/log.py
@@ -25,7 +25,6 @@ except ImportError:
 
 TOR_RUNLEVELS = ['DEBUG', 'INFO', 'NOTICE', 'WARN', 'ERR']
 TIMEZONE_OFFSET = time.altzone if time.localtime()[8] else time.timezone
-CONFIG = stem.util.conf.config_dict('nyx', {'tor.chroot': ''})
 
 
 def day_count(timestamp):
@@ -55,7 +54,7 @@ def log_file_path(controller):
     entry_comp = log_entry.split()  # looking for an entry like: notice file /var/log/tor/notices.log
 
     if entry_comp[1] == 'file':
-      return CONFIG['tor.chroot'] + entry_comp[2]
+      return nyx.util.expand_path(entry_comp[2])
 
 
 @lru_cache()



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits