Skip to content

Traceback when there's no file permissions #16

@iranzo

Description

@iranzo
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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions