better with add .
This commit is contained in:
parent
02d279b6c4
commit
537a905f85
4 changed files with 60 additions and 5 deletions
15
launcher.py
15
launcher.py
|
@ -48,6 +48,8 @@ def run_bot(unload: list = []):
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
log = logging.getLogger()
|
log = logging.getLogger()
|
||||||
|
|
||||||
|
print(gettext('Stating...'))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
pool = loop.run_until_complete(
|
pool = loop.run_until_complete(
|
||||||
Table.create_pool(config.postgresql, command_timeout=60)
|
Table.create_pool(config.postgresql, command_timeout=60)
|
||||||
|
@ -85,13 +87,18 @@ def _update():
|
||||||
|
|
||||||
if current != last:
|
if current != last:
|
||||||
print(gettext('A new version is available !'))
|
print(gettext('A new version is available !'))
|
||||||
|
check = None
|
||||||
|
|
||||||
|
while check not in ['', 'y', 'n', 'o']:
|
||||||
check = input(gettext('Update ? [Y/n] ')).lower().strip()
|
check = input(gettext('Update ? [Y/n] ')).lower().strip()
|
||||||
|
print(check)
|
||||||
|
|
||||||
while check not in ['', 'y', 'n']:
|
if check in ['y', '', 'o']:
|
||||||
check = input(gettext('Update ? [Y/n]'))
|
print(gettext('Downloading...'))
|
||||||
|
|
||||||
|
origin = git.Repo(search_parent_directories=True).remotes['origin']
|
||||||
|
origin.pull()
|
||||||
|
|
||||||
if check == 'y':
|
|
||||||
local.remotes.origin.pull()
|
|
||||||
with setup_logging():
|
with setup_logging():
|
||||||
run_bot()
|
run_bot()
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -15,6 +15,10 @@ msgstr ""
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
|
|
||||||
|
|
||||||
|
#: launcher.py:51
|
||||||
|
msgid "Stating..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: launcher.py:56 launcher.py:57
|
#: launcher.py:56 launcher.py:57
|
||||||
msgid "Could not set up PostgreSQL..."
|
msgid "Could not set up PostgreSQL..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -27,6 +31,26 @@ msgstr ""
|
||||||
msgid "Search for update"
|
msgid "Search for update"
|
||||||
msgstr ""
|
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
|
#: bot.py:52
|
||||||
msgid "Failed to load extension : "
|
msgid "Failed to load extension : "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
Binary file not shown.
|
@ -15,6 +15,10 @@ msgstr ""
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
|
|
||||||
|
|
||||||
|
#: launcher.py:51
|
||||||
|
msgid "Stating..."
|
||||||
|
msgstr "Démarrage..."
|
||||||
|
|
||||||
#: launcher.py:56 launcher.py:57
|
#: launcher.py:56 launcher.py:57
|
||||||
msgid "Could not set up PostgreSQL..."
|
msgid "Could not set up PostgreSQL..."
|
||||||
msgstr "Impossible de lancer PostgreSQL..."
|
msgstr "Impossible de lancer PostgreSQL..."
|
||||||
|
@ -27,6 +31,26 @@ msgstr "Lancer sans charger le module <TEXT>"
|
||||||
msgid "Search for update"
|
msgid "Search for update"
|
||||||
msgstr "Rechercher les mises à jour"
|
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
|
#: bot.py:52
|
||||||
msgid "Failed to load extension : "
|
msgid "Failed to load extension : "
|
||||||
msgstr "Impossible de charger l'extension : "
|
msgstr "Impossible de charger l'extension : "
|
||||||
|
|
Loading…
Reference in a new issue