Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected 'OpenVPN CLIENT LIST' #15

Open
nazububu opened this issue Mar 26, 2020 · 0 comments
Open

Expected 'OpenVPN CLIENT LIST' #15

nazububu opened this issue Mar 26, 2020 · 0 comments

Comments

@nazububu
Copy link

nazububu commented Mar 26, 2020

Hello!

Package version: 0.2.1
Python version: 3.7.5
OS: Ubuntu 19.04

The fact is that if the OpenVPN status file is empty (for some reason, OpenVPN was able to create it, but an error occurred and there is no content inside) - an exception appears:

openvpn_status.parser.ParsingError: expected 'OpenVPN CLIENT LIST' but got end of input

Traceback:

Traceback (most recent call last):
  File "/srv/openvpn-status/venv/lib/python3.7/site-packages/openvpn_status/parser.py", line 49, in expect_line
    line = next(self)
  File "/srv/openvpn-status/venv/lib/python3.7/site-packages/openvpn_status/parser.py", line 30, in __next__
    line = next(self.lines).strip()
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "parser.py", line 10, in <module>
    parser = openvpn_status.parse_status(file.read())
  File "/srv/openvpn-status/venv/lib/python3.7/site-packages/openvpn_status/shortcuts.py", line 18, in parse_status
    return parser.parse()
  File "/srv/openvpn-status/venv/lib/python3.7/site-packages/openvpn_status/parser.py", line 84, in parse
    return self._parse()
  File "/srv/openvpn-status/venv/lib/python3.7/site-packages/openvpn_status/parser.py", line 93, in _parse
    self.expect_line(Status.client_list.label)
  File "/srv/openvpn-status/venv/lib/python3.7/site-packages/openvpn_status/parser.py", line 51, in expect_line
    raise ParsingError('expected %r but got end of input' % content)
openvpn_status.parser.ParsingError: expected 'OpenVPN CLIENT LIST' but got end of input

If you need any information about this, I will be glad to share :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant