| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 self.response.out.write("FAIL: missing builder parameter.") | 243 self.response.out.write("FAIL: missing builder parameter.") |
| 244 return | 244 return |
| 245 | 245 |
| 246 master_parameter = self.request.get(PARAM_MASTER) | 246 master_parameter = self.request.get(PARAM_MASTER) |
| 247 | 247 |
| 248 master_data = master_config.getMasterByMasterName(master_parameter) | 248 master_data = master_config.getMasterByMasterName(master_parameter) |
| 249 if master_data: | 249 if master_data: |
| 250 deprecated_master = master_parameter | 250 deprecated_master = master_parameter |
| 251 master = master_data['url_name'] | 251 master = master_data['url_name'] |
| 252 else: | 252 else: |
| 253 deprecated_master = None |
| 253 master = master_parameter | 254 master = master_parameter |
| 254 | 255 |
| 255 test_type = self.request.get(PARAM_TEST_TYPE) | 256 test_type = self.request.get(PARAM_TEST_TYPE) |
| 256 | 257 |
| 257 logging.debug( | 258 logging.debug( |
| 258 "Processing upload request, master: %s, builder: %s, test_type: %s."
, | 259 "Processing upload request, master: %s, builder: %s, test_type: %s."
, |
| 259 master, builder, test_type) | 260 master, builder, test_type) |
| 260 | 261 |
| 261 # There are two possible types of each file_params in the request: | 262 # There are two possible types of each file_params in the request: |
| 262 # one file item or a list of file items. | 263 # one file item or a list of file items. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 316 |
| 316 class UploadForm(webapp2.RequestHandler): | 317 class UploadForm(webapp2.RequestHandler): |
| 317 """Show a form so user can upload a file.""" | 318 """Show a form so user can upload a file.""" |
| 318 | 319 |
| 319 def get(self): | 320 def get(self): |
| 320 template_values = { | 321 template_values = { |
| 321 "upload_url": "/testfile/upload", | 322 "upload_url": "/testfile/upload", |
| 322 } | 323 } |
| 323 self.response.out.write(template.render("templates/uploadform.html", | 324 self.response.out.write(template.render("templates/uploadform.html", |
| 324 template_values)) | 325 template_values)) |
| OLD | NEW |