From fca34456ae554bcd3ca39364bf447c999678ee1c Mon Sep 17 00:00:00 2001 From: watzo Date: Fri, 17 Jun 2022 08:25:56 +0200 Subject: [PATCH] #6 2to3 fixes --- examples/checkout.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/checkout.py b/examples/checkout.py index 3fa6e1a..daaa735 100755 --- a/examples/checkout.py +++ b/examples/checkout.py @@ -4,11 +4,11 @@ # usage: checkout.py # checkout.py -import sys, urllib, zipfile, os, os.path +import sys, urllib.request, urllib.parse, urllib.error, zipfile, os, os.path from aksy.device import Devices def checkout(url, destdir=''): - file = urllib.urlretrieve(url)[0] + file = urllib.request.urlretrieve(url)[0] zip = zipfile.ZipFile(file) if zip.testzip() is not None: raise Exception('Corrupt zipfile') @@ -38,10 +38,10 @@ def checkout(url, destdir=''): def process_file(z48, file): name, ext = os.path.splitext(file) - print ext + print(ext) if ext.lower() not in ['.akp', '.akm', '.wav', '.aiff']: return - print "Uploading file: " + repr(file) + print("Uploading file: " + repr(file)) z48.put(file, os.path.basename(file)) # set current program if ext.lower() == '.akp':