From e2a94a5be3c33b298ffab84905286daae7fd6e31 Mon Sep 17 00:00:00 2001 From: "Andrew A. Bille" Date: Tue, 26 Oct 2021 14:03:00 +0700 Subject: [PATCH] tests: Compat restore tests with python2 for testing basic tests in old platforms --- tests/restore.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/restore.py b/tests/restore.py index bbdadeb23..733f9caba 100644 --- a/tests/restore.py +++ b/tests/restore.py @@ -4,7 +4,11 @@ import subprocess import sys from time import sleep -from datetime import datetime, timedelta, timezone +from datetime import datetime, timedelta +try: + from datetime import timezone +except ImportError: # py2compat + from pytz import timezone import hashlib import shutil import json