Trackers loaded from trackers_file will be appended to trackers instead of replacing it
This commit is contained in:
parent
7e8a93e974
commit
71806e6f95
1 changed files with 13 additions and 4 deletions
|
@ -269,10 +269,19 @@ class Config(object):
|
||||||
return self.parser
|
return self.parser
|
||||||
|
|
||||||
def loadTrackersFile(self):
|
def loadTrackersFile(self):
|
||||||
self.trackers = []
|
if not self.trackers_file:
|
||||||
for tracker in open(self.trackers_file):
|
return None
|
||||||
if "://" in tracker:
|
|
||||||
self.trackers.append(tracker.strip())
|
self.trackers = self.arguments.trackers[:]
|
||||||
|
|
||||||
|
try:
|
||||||
|
for line in open(self.trackers_file):
|
||||||
|
tracker = line.strip()
|
||||||
|
if "://" in tracker and tracker not in self.trackers:
|
||||||
|
self.trackers.append(tracker)
|
||||||
|
except Exception as err:
|
||||||
|
print "Error loading trackers files: %s" % err
|
||||||
|
|
||||||
|
|
||||||
# Find arguments specified for current action
|
# Find arguments specified for current action
|
||||||
def getActionArguments(self):
|
def getActionArguments(self):
|
||||||
|
|
Loading…
Reference in a new issue