On 04/29/10 06:20 PM, Danek Duvall wrote:
Shawn Walker wrote:

http://cr.opensolaris.org/~swalker/pkg-file/
...
query_parser.py:

   - line 1018: Now that _global_data_dict is no longer a class variable,
     and isn't created in the constructor, what's the guarantee that we
     won't get an AttributeError here?

That was sort of intentional. Only the TermQuery subclasses should be used as TermQuery is really abstract and as far as I know that's the case. I'll add a comment to the class.

   - line 1069: should we use "with" here?

I don't follow.

...
transport/transport.py:
...
   - line 186: Why not make pub_caches a dict instead of a list?  Then you
     can do a simple test instead of looping.  Or do you expect to want to
     order the caches?

I want to order the caches so that the most-specific to least-specific is checked first. That is, if I return a list of caches for a given publisher, the publisher's specific read-only cache will be returned first and then the shared cache after with the assumption that the publisher-specific one is most likely to contain the data.

server/repository.py:

   - line 911: I think you're better off doing a stat() of self.repo_root.
     That way, you can check its result in one system call, but also if you
     don't have search perms to one of its parent directories, you'll get an
     exception with errno == EACCES, and can properly raise a
     PermissionsException there, too.

I hope I understood properly; I've reworked this.

t_api_search.py:

   - line 1874: Magic!

Necessary magic until we have some way of waiting until search indexing is complete. This same "technique" is used in other places...

pkg5unittest.py:

   - line 1437: the second half of this or is always True; did you mwan to
     have "in out" after the string?

Yes, thanks.

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

Reply via email to