Tom Mueller wrote: > Shawn, > Thank you for the comments. > Shawn Walker wrote: >> >> history.py: >> line 555: a tuple instead of a list? > My Python newness is showing. Either a list or a tuple works here. Why > is a tuple preferable to a list?
Minor efficiency; lists have more overhead than tuples. So if it's just a list of values to iterate over, there's no reason to use a list. >> cli/t_actuators.py: >> lines 167, 172: let's not use /bin/sh. who knows what shell that >> will be? instead, specify /usr/bin/bash or /usr/bin/ksh or >> /usr/bin/ksh93. /bin/sh is undefined. > None of those shells exist on Linux either. Linux doesn't include any > shells in /usr/bin. I had thought that /bin/sh was a pretty standard way > to reference a POSIX shell. Hrm, actually, you're right. My recollection of this was wrong. If you have a script that needs anything beyond POSIX shell functionality it should be /bin/bash, etc. But if you're only using POSIX shell functionality, #!/bin/sh is the right thing to do [1]. >> >> cli/testutils.py: >> line 35: given that you trap this import as you did pspawn, why not >> check for the presence of pwd in globals as you did for pspawn first? > Because get_su_wrap_user is never called on systems that don't have pwd > (Windows). On Windows we only run the API tests. But the test framework > reads in the Python modules (including testutils.py) for all tests even > though they are not run. To get the CLI tests to run on Windows is a > much bigger task that I'm not taking on this this changeset. > > Would it be better to localize the import of pwd to the get_su_wrap_user > method? Danek would be a better person to answer that, I'm fine with your explanation. Cheers, -- Shawn Walker [1] http://mail.opensolaris.org/pipermail/indiana-discuss/2007-September/002165.html _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
