diff --git a/software_objects/file-upload/upload.cgi b/software_objects/file-upload/upload.cgi index 50773e3..06839d7 100644 --- a/software_objects/file-upload/upload.cgi +++ b/software_objects/file-upload/upload.cgi @@ -17,7 +17,7 @@ UPLOADS = "/var/www/uploads/" def upload (inputname, upload_dir): form = cgi.FieldStorage() - if not form.has_key(inputname): return + if not inputname in form: return fileitem = form[inputname] if not fileitem.file: return fp = os.path.join(upload_dir, fileitem.filename)