Fixed crash when starting with no libraries at all
authorEdouard Tisserant
Thu, 14 Jun 2012 14:42:00 +0200
changeset 769 502939f9c477
parent 768 fe47069f214c
child 770 131110501214
Fixed crash when starting with no libraries at all
ProjectController.py
--- a/ProjectController.py	Mon Jun 11 02:34:23 2012 +0200
+++ b/ProjectController.py	Thu Jun 14 14:42:00 2012 +0200
@@ -61,7 +61,7 @@
                 """+targets.GetTargetChoices()+"""
                 </xsd:choice>
               </xsd:complexType>
-            </xsd:element>
+            </xsd:element>"""+(("""
             <xsd:element name="Libraries" minOccurs="0">
               <xsd:complexType>
               """+"\n".join(['<xsd:attribute name='+
@@ -69,7 +69,7 @@
                              'type="xsd:boolean" use="optional" default="true"/>' 
                              for libname,lib in features.libraries])+"""
               </xsd:complexType>
-            </xsd:element>
+            </xsd:element>""") if len(features.libraries)>0 else '') + """
           </xsd:sequence>
           <xsd:attribute name="URI_location" type="xsd:string" use="optional" default=""/>
           <xsd:attribute name="Disable_Extensions" type="xsd:boolean" use="optional" default="false"/>