status.append('%s:%d' % self.addr)
except TypeError:
status.append(repr(self.addr))
- return '<%s at %#x>' % (' '.join(status), id(self))
+ # On some systems (RH10) id() can be a negative number.
+ # work around this.
+ MAX = 2L*sys.maxint+1
+ return '<%s at %#x>' % (' '.join(status), id(self)&MAX)
def add_channel(self, map=None):
#self.log_info('adding channel %s' % self)
self.offset_data = 0 # the file's data starts here
def __repr__(self):
- return "<%s %r at %#x>" % (self.__class__.__name__,self.name,id(self))
+ # On some systems (RH10) id() can be a negative number.
+ # work around this.
+ MAX = 2L*sys.maxint+1
+ return "<%s %r at %#x>" % (self.__class__.__name__,self.name,
+ id(self)&MAX)
def frombuf(cls, buf):
"""Construct a TarInfo object from a 512 byte string buffer.
* SAX 2 namespaces
"""
+import sys
import xml.dom
from xml.dom import EMPTY_NAMESPACE, EMPTY_PREFIX, XMLNS_NAMESPACE, domreg
self, namespaceURI, localName, NodeList())
def __repr__(self):
- return "<DOM Element: %s at %#x>" % (self.tagName, id(self))
+ # On some systems (RH10) id() can be a negative number.
+ # work around this.
+ MAX = 2L*sys.maxint+1
+ return "<DOM Element: %s at %#x>" % (self.tagName, id(self)&MAX)
def writexml(self, writer, indent="", addindent="", newl=""):
# indent = current indentation