bsddb read-only requires rw access to close?

Harry Pehkonen harry.pehkonen at hotpop.com
Fri Aug 29 16:20:29 EDT 2003


Stats:
        Python2.3
        windows2000 professional

If I have ``Full Control'' of a bsddb file, no problem:

        >>> import bsddb
        >>> a = bsddb.btopen("c:/sharedrw/db/npanxx2pseudo.db", "r")
        >>> a.close()
        >>> 

... but if I change to read-only access (as in permissions on file):

        >>> a = bsddb.btopen("c:/sharedrw/db/npanxx2pseudo.db", "r")
        >>> a.close()

        Traceback (most recent call last):
          File "<pyshell#30>", line 1, in -toplevel-
            a.close()
          File "C:\Python23\lib\bsddb\__init__.py", line 101, in close
            v = self.db.close()
        DBPermissionsError: (1, 'Operation not permitted')

Performing a close() with read/write access with file opened "r" does
not change the last-modified time/date.

Is this a bug?

Thanks!
Harry.




More information about the Python-list mailing list