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

[tor-commits] [sbws/master] Remove is_innited dependency



commit c21232f3407a30607e7e0bff8f954d183f8f02c8
Author: juga0 <juga@xxxxxxxxxx>
Date:   Wed Jul 18 19:50:16 2018 +0000

    Remove is_innited dependency
---
 sbws/core/cleanup.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sbws/core/cleanup.py b/sbws/core/cleanup.py
index 18d8380..4600cf8 100644
--- a/sbws/core/cleanup.py
+++ b/sbws/core/cleanup.py
@@ -2,7 +2,7 @@
 import types
 
 from sbws.util.filelock import DirectoryLock
-from sbws.globals import (fail_hard, is_initted)
+from sbws.globals import fail_hard
 from sbws.util.timestamp import unixts_to_dt_obj
 from argparse import ArgumentDefaultsHelpFormatter
 from datetime import datetime
@@ -174,11 +174,9 @@ def main(args, conf):
     :param argparse.Namespace args: command line arguments
     :param configparser.ConfigParser conf: parsed config files
     '''
-    if not is_initted(args.directory):
-        fail_hard('Sbws isn\'t initialized. Try sbws init')
-
-    if args.no_results and args.no_v3bw:
-        fail_hard('Nothing to clean.')
+    datadir = conf['paths']['datadir']
+    if not os.path.isdir(datadir):
+        fail_hard('%s does not exist', datadir)
 
     if not args.no_results:
         _clean_result_files(args, conf)



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