Package: python3-dbf
Version: 0.96.005-1
Severity: normal

Hello,

thank you for maintaining python3-dbf.

$ chmod 0400 /tmp/test.dbf 
$ python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04) 
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbf
>>> t = dbf.Table("/tmp/test.dbf")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/dbf/ver_33.py", line 4761, in __init__
    raise DbfError(str(e)) from None
dbf.ver_33.DbfError: [Errno 13] Permission denied: '/tmp/test.dbf'


It seems that the code uses "r+b" for opening files "read only", and "w+b" to
open them read-write, forgetting that the "+" stands for "update".


Enrico


-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-dbf depends on:
pn  python3:any  <none>

python3-dbf recommends no packages.

Versions of packages python3-dbf suggests:
pn  python-dbf-doc  <none>

-- no debconf information

Reply via email to