Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version: include python version #1462

Merged
merged 1 commit into from
Mar 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sopel/modules/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from sopel.module import commands, intent, rate
import re
from os import path
import platform


log_line = re.compile(r'\S+ (\S+) (.*? <.*?>) (\d+) (\S+)\tcommit[^:]*: (.+)')

Expand All @@ -37,13 +39,13 @@ def version(bot, trigger):
"""Display the latest commit version, if Sopel is running in a git repo."""
sha = git_info()
if not sha:
msg = 'Sopel v. ' + release
msg = 'Sopel v. ' + release + ' (Python {})'.format(platform.python_version())
if release[-4:] == '-git':
msg += ' at unknown commit.'
bot.reply(msg)
return

bot.reply("Sopel v. {} at commit: {}".format(release, sha))
bot.reply("Sopel v. {} (Python {}) at commit: {}".format(release, platform.python_version(), sha))


@intent('VERSION')
Expand Down