1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

move url extraction to plugins

This commit is contained in:
Thorsten
2015-11-28 18:41:40 +01:00
parent 47454bb444
commit d94d62335f
3 changed files with 70 additions and 90 deletions

View File

@@ -50,9 +50,9 @@ def conf_set(key, value):
conf_save(blob)
def conf_get(key):
def conf_get(key, default=None):
blob = conf_load()
return blob.get(key)
return blob.get(key, default)
Bucket = namedtuple("BucketConfig", ["history", "period", "max_hist_len"])
@@ -170,7 +170,7 @@ def extract_title(url):
log = logging.getLogger(__name__)
global parser
if 'repo/urlbot.git' in url:
if 'repo/urlbot-native.git' in url:
log.info('repo URL found: ' + url)
return 3, 'wee, that looks like my home repo!'