From 63d4a722f10b3d3c35ed0812f78d57db7d24bca7 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sun, 22 Mar 2020 16:57:19 +0100 Subject: [PATCH] Fix crash on old python 3 --- connectors.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/connectors.py b/connectors.py index d65139d..0128cfe 100644 --- a/connectors.py +++ b/connectors.py @@ -324,13 +324,13 @@ class Pantsu(Connector): locale.setlocale(locale.LC_ALL, ('en_US', 'UTF-8')) formatted_date = datetime.strptime( '%s/%s/%s, %s:%s:%s %s' % ( - splitted_date[1], - splitted_date[2], - splitted_date[3], - splitted_date[4].zfill(2).replace('00', '12'), - splitted_date[5], - splitted_date[6], - splitted_date[7] + splitted_date.group(1), + splitted_date.group(2), + splitted_date.group(3), + splitted_date.group(4).zfill(2).replace('00', '12'), + splitted_date.group(5), + splitted_date.group(6), + splitted_date.group(7) ), '%m/%d/%Y, %I:%M:%S %p' ) locale.setlocale(locale.LC_ALL, current_locale)