~canonical-platform-qa/ubuntu-community-testing/fix-oauth-validation

« back to all changes in this revision

Viewing changes to ubuntu_pt_community/api/v1.py

  • Committer: Christopher Lee
  • Date: 2015-08-12 05:42:48 UTC
  • Revision ID: chris.lee@canonical.com-20150812054248-nlzgiwmgnfamxzw2
Check example code fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    print(request.files)
49
49
 
50
50
    print('file data>p')
51
 
    print(request.files['data'].stream.getvalue())
 
51
    try:
 
52
        print(request.files['data'].stream.getvalue())
 
53
        # XXX This is where the PractiTest upload method/code goes.
 
54
    except KeyError:
 
55
        print('No files provided.')
52
56
 
53
57
    return 'Uploading successful.'