VirtualBox

Changeset 59487 in vbox


Ignore:
Timestamp:
Jan 26, 2016 8:07:43 PM (9 years ago)
Author:
vboxsync
Message:

websrv-python.xsl: improved fix of safearray handling in attribute setters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/webservice/websrv-python.xsl

    r59486 r59487  
    114114       req=<xsl:value-of select="$ifname"/>_<xsl:value-of select="$fname"/>RequestMsg()
    115115       req._this=self.handle
    116        <xsl:choose>
    117          <xsl:when test="$attrsafearray='yes'">
    118           <xsl:text>req._</xsl:text><xsl:value-of select="$attrname"/><xsl:text> = value</xsl:text>
    119          </xsl:when>
    120          <xsl:otherwise>
    121            <xsl:text>if type(value) in [int, bool, basestring, str]:
    122             req._</xsl:text><xsl:value-of select="$attrname"/><xsl:text> = value
     116       if type(value) in [int, bool, basestring, str, tuple, list]:
     117            req._<xsl:value-of select="$attrname"/> = value
    123118       else:
    124             req._</xsl:text><xsl:value-of select="$attrname"/><xsl:text> = value.handle</xsl:text>
    125          </xsl:otherwise>
    126        </xsl:choose>
     119            req._<xsl:value-of select="$attrname"/> = value.handle
    127120       self.mgr.getPort().<xsl:value-of select="$ifname"/>_<xsl:value-of select="$fname"/>(req)
    128121</xsl:template>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette