def getContentType(self): # (mimetype, _mimeencoding) = mimetypes.guess_type(self.path) # print "mimetype(%s): %r, %r" % (self.path, mimetype, _mimeencoding) # if not mimetype: # mimetype = "application/octet-stream" # print "mimetype(%s): return %r" % (self.path, mimetype) # return mimetype return util.guessMimeType(self.path)