# HG changeset patch # User Edouard Tisserant # Date 1339681857 -7200 # Node ID 131110501214a129982c62fb58c07b0fcdd684a5 # Parent 502939f9c477ea19e351ed2c16eff1a9c5e7d709 Fixed loading projects with no libraries at all diff -r 502939f9c477 -r 131110501214 ProjectController.py --- a/ProjectController.py Thu Jun 14 14:42:00 2012 +0200 +++ b/ProjectController.py Thu Jun 14 15:50:57 2012 +0200 @@ -61,15 +61,15 @@ """+targets.GetTargetChoices()+""" </xsd:choice> </xsd:complexType> - </xsd:element>"""+((""" - <xsd:element name="Libraries" minOccurs="0"> + </xsd:element> + <xsd:element name="Libraries" minOccurs="0">"""+((""" <xsd:complexType> """+"\n".join(['<xsd:attribute name='+ '"Enable_'+ libname + '_Library" '+ 'type="xsd:boolean" use="optional" default="true"/>' for libname,lib in features.libraries])+""" - </xsd:complexType> - </xsd:element>""") if len(features.libraries)>0 else '') + """ + </xsd:complexType>""") if len(features.libraries)>0 else '<xsd:complexType/>') + """ + </xsd:element> </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"/> @@ -371,6 +371,8 @@ return "\n".join([ lib.GetSTCode() for lib in self.Libraries ]) def GetLibrariesCCode(self, buildpath): + if len(self.Libraries)==0: + return [],[],() self.GetIECProgramsAndVariables() LibIECCflags = '"-I%s"'%os.path.abspath(self.GetIECLibPath()) LocatedCCodeAndFlags=[]