Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: Tools/TestResultServer/handlers/testfilehandler.py

Issue 462883002: Fix uploading with non deprecated master names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Tools/TestResultServer/handlers/testfilehandler_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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))
OLDNEW
« no previous file with comments | « no previous file | Tools/TestResultServer/handlers/testfilehandler_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698