Saurabh Vyas wrote: > But the call to make_bundle (from gen_actions()) result in TypeError > only, thus we still will end-up having TypeErrror in this case (and not > the bundle not found !!!) Is this correct behavior?
>From the way the code was written, it was intentional, but I'm not sure it was correct. I'd say you have two options. One is to fix the bug as narrowly as possible: catch TypeError like you're doing above and report an unknown bundle type regardless of whether it's unknown or nonexistent. The second would be to go through the bundle code and allow EnvironmentErrors to be raised from each bundle's test() functions. But then you have to decide whether to let them all through, or just certain ones. The reason there's a blanket catch statement there is so that the loop in make_bundle() will continue through all the bundle types before it gives up. I think one idea was that a bundle could be made available via a URL, so the fact that, say, TarBundle might claim ENOENT shouldn't preclude SolarisPackageStreamBundle from taking a peek at the URL named by "filename". But we don't do that right now, and have no specific plans to, so you could ignore it for your fix. Danek _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
