better with add .

This commit is contained in:
Romain J 2019-09-10 23:44:44 +02:00
parent 02d279b6c4
commit 537a905f85
4 changed files with 60 additions and 5 deletions

View file

@ -48,6 +48,8 @@ def run_bot(unload: list = []):
loop = asyncio.get_event_loop()
log = logging.getLogger()
print(gettext('Stating...'))
try:
pool = loop.run_until_complete(
Table.create_pool(config.postgresql, command_timeout=60)
@ -85,13 +87,18 @@ def _update():
if current != last:
print(gettext('A new version is available !'))
check = input(gettext('Update ? [Y/n]')).lower().strip()
check = None
while check not in ['', 'y', 'n']:
check = input(gettext('Update ? [Y/n]'))
while check not in ['', 'y', 'n', 'o']:
check = input(gettext('Update ? [Y/n] ')).lower().strip()
print(check)
if check in ['y', '', 'o']:
print(gettext('Downloading...'))
origin = git.Repo(search_parent_directories=True).remotes['origin']
origin.pull()
if check == 'y':
local.remotes.origin.pull()
with setup_logging():
run_bot()
else:

View file

@ -15,6 +15,10 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
#: launcher.py:51
msgid "Stating..."
msgstr ""
#: launcher.py:56 launcher.py:57
msgid "Could not set up PostgreSQL..."
msgstr ""
@ -27,6 +31,26 @@ msgstr ""
msgid "Search for update"
msgstr ""
#: launcher.py:73
msgid "Checking for update..."
msgstr ""
#: launcher.py:89
msgid "A new version is available !"
msgstr ""
#: launcher.py:93
msgid "Update ? [Y/n] "
msgstr ""
#: launcher.py:97
msgid "Downloading..."
msgstr ""
#: launcher.py:108
msgid "Tuxbot is up to date"
msgstr ""
#: bot.py:52
msgid "Failed to load extension : "
msgstr ""

Binary file not shown.

View file

@ -15,6 +15,10 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
#: launcher.py:51
msgid "Stating..."
msgstr "Démarrage..."
#: launcher.py:56 launcher.py:57
msgid "Could not set up PostgreSQL..."
msgstr "Impossible de lancer PostgreSQL..."
@ -27,6 +31,26 @@ msgstr "Lancer sans charger le module <TEXT>"
msgid "Search for update"
msgstr "Rechercher les mises à jour"
#: launcher.py:73
msgid "Checking for update..."
msgstr "Recherche de mise à jour..."
#: launcher.py:89
msgid "A new version is available !"
msgstr "Une nouvelle version est disponnible !"
#: launcher.py:93
msgid "Update ? [Y/n] "
msgstr "Mettre à jour ? [O/n]"
#: launcher.py:97
msgid "Downloading..."
msgstr "Téléchargement..."
#: launcher.py:108
msgid "Tuxbot is up to date"
msgstr "Tuxbot est à jour"
#: bot.py:52
msgid "Failed to load extension : "
msgstr "Impossible de charger l'extension : "