[Dev OpenGP] [79] Buxfix (string to bool) |
[ Thread Index |
Date Index
| More opengp.tuxfamily.org/development Archives
]
Revision: 79
Author: alband85
Date: 2009-03-24 14:34:45 +0100 (Tue, 24 Mar 2009)
Log Message:
-----------
Buxfix (string to bool)
Modified Paths:
--------------
trunk/src/lib/ogp/etree/elementmethods.py
trunk/src/lib/ogp/etree/ogpxmlconsts.py
Modified: trunk/src/lib/ogp/etree/elementmethods.py
===================================================================
--- trunk/src/lib/ogp/etree/elementmethods.py 2009-03-24 13:34:17 UTC (rev 78)
+++ trunk/src/lib/ogp/etree/elementmethods.py 2009-03-24 13:34:45 UTC (rev 79)
@@ -4,6 +4,7 @@
from lxml.etree import *
from copy import deepcopy
from ogpxmlconsts import *
+from ogp.misc import *
def Element(name):
OGP_PARSER = XMLParser()
@@ -77,7 +78,7 @@
if b is None:
return False
else:
- return bool(b)
+ return smart_bool(b)
def __setBlocking(self, blocking):
"""
@@ -176,8 +177,8 @@
raise OgpXmlError('merge: peer has not same name or attributes.')
#Nodes must have same content. If not, raise OgpXmlError
- if ((len(self) == 0) ^ (len(peer) == 0)) or ((self.text is None) ^ (peer.text is None)):
- raise OgpXmlError('merge: peer has not same type of content.')
+ if ((len(self) == 0) ^ (len(peer) == 0)) and ((self.text is None) ^ (peer.text is None)):
+ raise OgpXmlError('merge: peer has not same type of content.\nself: ' + self.toString() + '\npeer: ' + peer.toString())
#if blocking, stop here
if self.blocking:return
Modified: trunk/src/lib/ogp/etree/ogpxmlconsts.py
===================================================================
--- trunk/src/lib/ogp/etree/ogpxmlconsts.py 2009-03-24 13:34:17 UTC (rev 78)
+++ trunk/src/lib/ogp/etree/ogpxmlconsts.py 2009-03-24 13:34:45 UTC (rev 79)
@@ -27,4 +27,5 @@
TAG_FILES = "files"
TAG_PLUGIN = "plugin"
- TAGS_SECURITY = ['ux', 'ur', 'uw', 'us', 'gx', 'gr', 'gw', 'gs', 'ox', 'or', 'ow', 't']
+ TAGS_OWN = ['uid', 'gid']
+ TAGS_MOD = ['ux', 'ur', 'uw', 'us', 'gx', 'gr', 'gw', 'gs', 'ox', 'or', 'ow', 't']