From d85e5aae68bfbedf8fbc6c3522613e8ef37c7efb Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 8 Oct 2022 13:01:52 +0200 Subject: [PATCH] telegram/openmamba_bot.py: update repositories list --- telegram/openmamba_bot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/telegram/openmamba_bot.py b/telegram/openmamba_bot.py index bcd9213..859812a 100755 --- a/telegram/openmamba_bot.py +++ b/telegram/openmamba_bot.py @@ -25,6 +25,7 @@ logger = logging.getLogger(__name__) timers = dict() social_log_last_ids = dict() +reps = [ 'devel', 'devel-makedist', 'devel-autodist', 'devel-kernel', 'devel-misc' ] def start(update: Update, context: CallbackContext): @@ -57,9 +58,10 @@ def query(update: Update, context: CallbackContext): logger.info("Query of %s: %s" % (user.first_name, update.message.text)) response = "" - for rep in [ 'devel', 'devel-games', 'devel-makedist', 'devel-autodist', 'devel-kernel', 'devel-misc', 'devel-kde4' ]: + for rep in reps: conn = sqlite3.connect('/var/webbuild/db/%s-sources.db' % rep, check_same_thread=False) cursor = conn.cursor() + print(rep) cursor.execute( 'SELECT id,name,version,release,summary,url FROM sources where name like "%%%s%%" or summary like "%%%s%%" ' 'ORDER BY name="%s" DESC, name like "%s%%" DESC, name like "%%%s%%" DESC limit 10' @@ -79,7 +81,7 @@ def details(update: Update, context: CallbackContext): logger.info("Details of %s: %s" % (user.first_name, update.message.text)) response = "" - for rep in [ 'devel', 'devel-games', 'devel-makedist', 'devel-autodist', 'devel-kernel', 'devel-misc', 'devel-kde4' ]: + for rep in reps: conn = sqlite3.connect('/var/webbuild/db/%s-sources.db' % rep, check_same_thread=False) cursor = conn.cursor() cursor.execute(