loop.py: Fix netinfo
@@ -69,14 +69,17 @@ class Loop(commands.Cog):
else:
entry_desc = 'No console specified.'
- begin = datetime(year=2000, month=1, day=1, tzinfo=self.bot.tz)
- end = datetime(year=2099, month=1, day=1, tzinfo=self.bot.tz)
if "begin" in entry:
begin = self.netinfo_parse_time(entry["begin"])
entry_desc += '\nBegins: ' + format_dt(begin)
+ else:
+ begin = datetime(year=2000, month=1, day=1, tzinfo=self.bot.tz)
+
if "end" in entry:
end = self.netinfo_parse_time(entry["end"])
entry_desc += '\nEnds: ' + format_dt(end)
+ else:
+ end = datetime(year=2099, month=1, day=1, tzinfo=self.bot.tz)
if now < end:
entry_name = "{} {}: {}".format(
