On 02/24/10 09:06 AM, Tim Foster wrote:
...
On Tue, 2010-02-23 at 15:06 -0600, Shawn Walker wrote:
...
src/publish.py:
    line 52: don't import this; see below

    line 134: the publication tools are currently not expected to catch
client ApiExceptions, and the publication API is intentionally setup to
completely wrap all errors raised so that callers only catch
TransactionError exceptions.  What was the case for this change?

I think I had been trying to see if there was a better exception I could
raise for this case, where we have a valid URL that we just can't
support, as opposed to an invalid URL and when I didn't find one, I
forgot to remove the additional exception we were catching.  I didn't
know that the publication tools were sectioned off in this way though -
thanks.

Really, in the end, an unsupported URI is the same as an invalid one to the client. If we need to make the distinction later on, we can have a different transaction exception or add a property to the existing exception.

I've updated the webrev, adding a test I should also have included:
checking that pkgsend create-repository returns 0 isn't enough, we need
to also make sure that the repository we think we created actually
exists each time we try a different URL.

The updated webrev is at
http://cr.opensolaris.org/~timf/14022-pkgsend-fileurl

tests/cli/t_pkgsend.py:
lines 253-254: This seems a bit confusing as the pkgsend create-repository step is what created the repository, not starting the depot in readonly mode. If you're actually testing the depot, you need to call rmtree() before starting it on the repo pkgsend created.

Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to