petit icon indicating copy to clipboard operation
petit copied to clipboard

Traceback when there's no file permissions

Open iranzo opened this issue 3 years ago • 0 comments

Traceback (most recent call last):
  File "/home/iranzo/.local/bin/petit", line 446, in <module>
    get_options()
  File "/home/iranzo/.local/bin/petit", line 233, in get_options
    eval(options.mode + "()")
  File "<string>", line 1, in <module>
  File "/home/iranzo/.local/bin/petit", line 246, in mode_hash
    log = CrunchLog(filename)
  File "/home/iranzo/.local/venvs/petitlog/lib/python3.7/site-packages/crunchtools/CrunchLog.py", line 68, in __init__
    self.f = open(filename)
PermissionError: [Errno 13] Permission denied: '/var/log/messages'
Exception ignored in: <function CrunchLog.__del__ at 0x7f4b68b4c290>
Traceback (most recent call last):
  File "/home/iranzo/.local/venvs/petitlog/lib/python3.7/site-packages/crunchtools/CrunchLog.py", line 98, in __del__
    self.f.close()
AttributeError: 'CrunchLog' object has no attribute 'f'

iranzo avatar Oct 17 '22 16:10 iranzo