WIP: change default data directories, subdirectories and config file
This commit is contained in:
parent
e8da744744
commit
bdddf58712
27 changed files with 263 additions and 121 deletions
|
@ -14,7 +14,7 @@ from util import helper
|
|||
class TrackerStorage(object):
|
||||
def __init__(self):
|
||||
self.log = logging.getLogger("TrackerStorage")
|
||||
self.file_path = "%s/trackers.json" % config.data_dir
|
||||
self.file_path = config.start_dir / 'trackers.json'
|
||||
self.load()
|
||||
self.time_discover = 0.0
|
||||
atexit.register(self.save)
|
||||
|
|
|
@ -9,7 +9,7 @@ from Config import config
|
|||
@pytest.mark.usefixtures("resetTempSettings")
|
||||
class TestAnnounceShare:
|
||||
def testAnnounceList(self, file_server):
|
||||
open("%s/trackers.json" % config.data_dir, "w").write("{}")
|
||||
(config.start_dir / 'trackers.json').open('w').write('{}')
|
||||
tracker_storage = AnnounceSharePlugin.tracker_storage
|
||||
tracker_storage.load()
|
||||
peer = Peer(file_server.ip, 1544, connection_server=file_server)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue