I ran across this problem while experimenting with durus. When I try to
pack(), the server side dies, apparently since it can't rename "t.fs.pack"
to "t.fs".
---- Server side ----
C:\Program Files\Python23\Lib\site-packages\durus>python
run_durus.py --file=t.fs
Storage file=t.fs host=127.0.0.1 port=2972
Ready with 0 objects
Committed 1 objects 77 bytes
Committed 1 objects 89 bytes
Pack
Traceback (most recent call last):
File "run_durus.py", line 79, in ?
options.port)
File "run_durus.py", line 26, in run_durus
StorageServer(storage, host=host, port=port).serve()
File "c:\program
files\python23\Lib\site-packages\durus\storage_server.py", li
ne 81, in serve
self.handle(s)
File "c:\program
files\python23\Lib\site-packages\durus\storage_server.py", li
ne 92, in handle
handler(s)
File "c:\program
files\python23\Lib\site-packages\durus\storage_server.py", li
ne 164, in handle_P
self.storage.pack()
File "c:\program files\python23\Lib\site-packages\durus\file_storage.py",
line
262, in pack
os.rename(pack_name, self.filename)
OSError: [Errno 13] Permission denied
C:\Program Files\Python23\Lib\site-packages\durus>
----- Client side ------
>>> from durus.client_storage import ClientStorage
>>> from durus.connection import Connection
>>> conn = Connection(ClientStorage())
>>> root = conn.get_root()
>>> root['a'] = 1
>>> root['b'] = 2
>>> conn.commit()
>>> for k,v in root.items():print k,v
....
a 1
b 2
>>> conn.pack()
Traceback (most recent call last):
File "", line 1, in ?
File "c:\program files\python23\Lib\site-packages\durus\connection.py",
line 262, in pack
self.storage.pack()
File "c:\program
files\python23\Lib\site-packages\durus\client_storage.py", line 79, in pack
status = recv(self.s, 1)
File "c:\program
files\python23\Lib\site-packages\durus\storage_server.py", line 31, in recv
raise IOError, 'connection reset by peer'
IOError: connection reset by peer
>>>
----- End printouts ------
Running with ClientStorage, on a windows XP sp 1 & 2. Python 2.3.1.
-e