From a6c66f6a94b075096cf2c8d50ba1ae64d5be48e5 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Sat, 26 Nov 2011 12:49:37 +0100 Subject: [PATCH] winfreed.py: rename 'package' field to 'package_name' --- winfreed.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/winfreed.py b/winfreed.py index 370caff..f4596b6 100755 --- a/winfreed.py +++ b/winfreed.py @@ -39,12 +39,12 @@ def process_all(path, cb): pkg = json.load(f) basename = os.path.basename(json_file) package_name = os.path.splitext(basename)[0] - pkg['package'] = package_name + pkg['package_name'] = package_name cb(pkg) f.close() def show(pkg): - print 'Package: ', pkg['package'] + print 'Package: ', pkg['package_name'] print 'Program: ', pkg['name'] print 'Homepage: ', pkg['homepage'] print @@ -60,12 +60,12 @@ def download(pkg): response = urllib2.urlopen(url) filename = urllib2.unquote(os.path.basename(response.geturl())) if filename == "": - sys.stderr.write("Debug (%s): filename: %s url: %s\n" %(pkg['package'], filename, response.geturl())) + sys.stderr.write("Debug (%s): filename: %s url: %s\n" %(pkg['package_name'], filename, response.geturl())) return destfile = os.path.join(OUTPUT_DIR, filename) if os.path.exists(destfile): - sys.stderr.write("Warning (%s): %s exists!\n" % (pkg['package'], destfile)) + sys.stderr.write("Warning (%s): %s exists!\n" % (pkg['package_name'], destfile)) return outfile = open(destfile, mode='w') -- 2.1.4