On 05/11/11 02:43 PM, Edward Pilatowicz wrote:
On Thu, May 05, 2011 at 04:18:20PM -0700, Shawn Walker wrote:
On 03/24/11 01:04 PM, Shawn Walker wrote:
Greetings,

The following webrev contains changes for the following RFE:

18076 pkg.config integer properties should allow specifying a min and
max

webrev:
http://cr.opensolaris.org/~swalker/pkg-18076/

Reviews appreciated :-)


src/modules/config.py

- in InvalidPropertyValueError, if there are minimum and maximum values
   i'm assuming we're dealing with integers here, so i'm a little
   surprised you're using %s as the format character for printing out
   minimum, maximum, and value.  (perhaps in python it doesn't matter as
   much as in c?)

Correct; Python doesn't care.

- in InvalidPropertyValueError, how about an assert verifying that if
   minimum or maximum are specified then they are integers (along with
   value).

Not necessary; the type of the value is already validated elsewhere. If they use the wrong type in the exception, I don't really care since everything is printed as strings. I will however add asserts to PropInt.__init__ verifying that min/max are None or an int().

- in InvalidPropertyValueError, how about an assert verifying that both
   minimum and maximum aren't specified at the same time.

I can do that.

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

Reply via email to