From bea4f29d28b3a93e17102b838a0e26539fd60cdf Mon Sep 17 00:00:00 2001 From: Alexandre Detiste Date: Sun, 10 Dec 2023 01:54:48 +0100 Subject: [PATCH] fix unfinished Python2 -> 3 translation found by mypy --- examples/weather.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/weather.py b/examples/weather.py index 23a0619..795d092 100644 --- a/examples/weather.py +++ b/examples/weather.py @@ -18,7 +18,7 @@ import calendar import json import os import time -import urllib +from urllib.request import urlopen from datetime import datetime from escpos.printer import Usb @@ -93,7 +93,7 @@ url = ( + LONG + "?exclude=[alerts,minutely,hourly,flags]&units=si" ) # change last bit to 'us' for Fahrenheit -response = urllib.urlopen(url) +response = urlopen(url) data = json.loads(response.read()) printer.print_and_feed(n=1)