Skip to content

Commit

Permalink
Time: Fix error handling in @tztime.
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Nov 9, 2021
1 parent 8326d6e commit 5aefd63
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/Time/plugin.py
Expand Up @@ -204,9 +204,11 @@ def tztime(self, irc, msg, args, timezone):
except utils.time.UnknownTimeZone:
irc.error(_('Unknown timezone'))
except utils.time.MissingTimezoneLibrary:
irc.error(_('Python-tz is required by the command, but is not '
'installed on this computer.'))
except utils.time.UnknownTimeZone as e:
irc.error(_(
'Timezone-related commands are not available. '
'Your administrator need to either upgrade Python to '
'version 3.9 or greater, or install pytz.'))
except utils.time.TimezoneException as e:
irc.error(e.args[0])
else:
format = self.registryValue("format", msg.channel, irc.network)
Expand Down

0 comments on commit 5aefd63

Please sign in to comment.