Comment 0 for bug 821366

Revision history for this message
Jonathan Lange (jml) wrote : No API for telling if someone can upload to PPA

There's no API for telling if someone can upload to a particular PPA. There are two APIs that look like they might be appropriate: IArchive.isSourceUploadAllowed and IArchive.checkUpload, but they provide strange results.

{{{
>>> ppa.checkUpload(person=me, distroseries=ubuntu.current_series, sourcepackagename='hello', component='main', pocket='Release')
True
>>> ppa.checkUpload(person=me, distroseries=ubuntu.current_series, sourcepackagename='whatever', component='main', pocket='Release')
Traceback (most recent call last):
...
NotFound: HTTP Error 404: Not Found
Response headers:
---
...
status: 404
...
---
Response body:
---
No such source package: 'whatever'.
---
}}}

isSourceUploadAllowed() says False for me uploading 'hello' to my own PPA and raises the same error for 'whatever'.

Exacerbated by bug 814725. If there were a way of actually getting feedback on upload, then we could just try & get the failure.