Samuli Seppänen wrote:
> here's the next version of the patch;

Functionally fine!


>  def main(config):
> +
> +    # Do a signed build by default
> +    unsignedBuild=False

Maybe name the option signedBuild instead? :)


> +    # Check if the SignTool module is present. This avoids ImportErrors 
> popping 
> +    # up annoyingly _after_ the build.
> +    if unsignedBuild == False:
> +       try:
> +          from signtool import SignTool
> +       except (ImportError):
> +          print "ERROR: SignTool python module not found! Can't do a signed 
> build."
> +          sys.exit(1)
> +
> +    if unsignedBuild == True:
> +       print "Doing an unsigned build as requested"

I guess the pythonic way would be simply:

if signedBuild:
  try import..
else:
  print as requested..


> -    sign(config, 'all')
> +
> +    if unsignedBuild == False:
> +       sign(config, 'all')
> +

signedBuild would be nicer, then simply:

if signedBuild:
  sign()


//Peter

Reply via email to