Anonymous avatar Anonymous committed 997a2af

comment out some denugging

Comments (0)

Files changed (1)

     def __call__(self, *arg, **kw):
         request = self.format_request(*arg, **kw)
-            response = self.send_request(request)
-            log.debug("Response: %s", response)
-            return response
+            return self.send_request(request)
+            #boz: remove logging of potentially large pieces
+            #log.debug("Response: %s", response)
+            #return response
         except HTTPError, e:
             if e.code in (202, 204):
                 return self.client.handle_response(self.method, None)
     def format_request(self, *arg, **kw):
         request = self.client.envelope(self.method.input(*arg, **kw))
         req_xml = etree.tostring(request)
-        log.debug("Request: %s", req_xml)
+        del request #boz ??
+        #boz: remove logging of potentially large pieces
+        #log.debug("Request: %s", req_xml)
         return Request(self.method.location, req_xml, self.headers())
     def send_request(self, request):
 class FloatType(SimpleType, float):
     xsi_type = (NS_XSD, 'float')
+    #boz: to eliminate bug with repr/str conversion for float numbers
+    def toxml(self, tag=None, namespace=None, nsmap=None, empty=False):
+        if tag is None:
+            tag = self._tag
+        if namespace is None:
+            namespace = self._namespace
+        if nsmap is None:
+            nsmap = self._nsmap
+        if tag is None or namespace is None or nsmap is None:
+            raise ValueError("%s has no associated xml context" % self)
+        try:
+            value = unicode(repr(self))
+        except TypeError:
+            value = None
+        tag = '{%s}%s' % (namespace, tag)
+        e = etree.Element(tag, nsmap=nsmap)
+        if value is not None and value != u'':
+            e.text = value
+        return e
 class DateTimeType(SimpleType, datetime):
         key = '_%s_' %
         if isinstance(value, (list, tuple)):
+            stop
             new = []
             for item in value:
                 if not isinstance(item, self.type):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.