https://bugzilla.novell.com/show_bug.cgi?id=466997
User poeml@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=466997#c10
--- Comment #10 from Peter Poeml 2009-01-21 11:59:33 MST ---
what osc does is the following:
<snip>
if file and not data:
size = os.path.getsize(file)
if size < 1024*512:
data = open(file).read()
else:
import mmap
filefd = open(file, 'r')
try:
data = mmap.mmap(filefd.fileno(), os.path.getsize(file),
mmap.MAP_SHARED, mmap.PROT_READ)
except EnvironmentError, e:
if e.errno == 19:
sys.exit('\n\n%s\nThe file \'%s\' could not be memory
mapped. It is ' \
'\non a filesystem which does not support this.' %
(e, file))
else:
raise
if conf.config['debug']: print method, url
try:
fd = urllib2.urlopen(req, data=data)
</snip>
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.