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

[unicode_info] Fallback if input is None (fix #957) #958

Merged
merged 1 commit into from
Jun 22, 2016
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
9 changes: 6 additions & 3 deletions sopel/modules/unicode_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
@example('.u ‽', 'U+203D INTERROBANG (‽)')
@example('.u 203D', 'U+203D INTERROBANG (‽)')
def codepoint(bot, trigger):
arg = trigger.group(2).strip()
if len(arg) == 0:
arg = trigger.group(2)
if not arg:
bot.reply('What code point do you want me to look up?')
return NOLIMIT
elif len(arg) > 1:
stripped = arg.strip()
if len(stripped) > 0:
arg = stripped
if len(arg) > 1:
if arg.startswith('U+'):
arg = arg[2:]
try:
Expand Down