mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Time: Fix error handling in @tztime.
This commit is contained in:
parent
8326d6ef7f
commit
5aefd6395f
@ -204,9 +204,11 @@ class Time(callbacks.Plugin):
|
|||||||
except utils.time.UnknownTimeZone:
|
except utils.time.UnknownTimeZone:
|
||||||
irc.error(_('Unknown timezone'))
|
irc.error(_('Unknown timezone'))
|
||||||
except utils.time.MissingTimezoneLibrary:
|
except utils.time.MissingTimezoneLibrary:
|
||||||
irc.error(_('Python-tz is required by the command, but is not '
|
irc.error(_(
|
||||||
'installed on this computer.'))
|
'Timezone-related commands are not available. '
|
||||||
except utils.time.UnknownTimeZone as e:
|
'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])
|
irc.error(e.args[0])
|
||||||
else:
|
else:
|
||||||
format = self.registryValue("format", msg.channel, irc.network)
|
format = self.registryValue("format", msg.channel, irc.network)
|
||||||
|
Loading…
Reference in New Issue
Block a user