sabayon r911 - in trunk: . lib/sources
- From: jrobeson svn gnome org
- To: svn-commits-list gnome org
- Subject: sabayon r911 - in trunk: . lib/sources
- Date: Thu, 17 Jan 2008 20:10:20 +0000 (GMT)
Author: jrobeson
Date: Thu Jan 17 20:10:19 2008
New Revision: 911
URL: http://svn.gnome.org/viewvc/sabayon?rev=911&view=rev
Log:
Make mandatory attribute in metadata xml files work
    Patch from https://bugzilla.redhat.com/show_bug.cgi?id=253996  
    by Josko Plazonic
Modified:
   trunk/ChangeLog
   trunk/lib/sources/filessource.py
Modified: trunk/lib/sources/filessource.py
==============================================================================
--- trunk/lib/sources/filessource.py	(original)
+++ trunk/lib/sources/filessource.py	Thu Jan 17 20:10:19 2008
@@ -140,10 +140,10 @@
 
     def __apply_foreach (self, source, path):
         attributes = self.storage.get_attributes (path)
+        mandatory = False
         if attributes.has_key ("mandatory"):
-            mandatory = bool (attributes ["mandatory"])
-        else:
-            mandatory = False
+            if attributes["mandatory"].lower() == "true":
+                mandatory = True
 
         self.storage.extract (path, self.home_dir, mandatory)
     
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]