OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
exabgp
/
configuration
/
core
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/16/2023 12:55:54 PM
rwxr-xr-x
📄
__init__.py
515 bytes
03/13/2021 04:30:48 PM
rw-r--r--
📁
__pycache__
-
03/16/2023 12:55:54 PM
rwxr-xr-x
📄
error.py
851 bytes
03/13/2021 04:30:48 PM
rw-r--r--
📄
format.py
3.56 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
location.py
1.49 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
scope.py
5.17 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
section.py
3.82 KB
03/13/2021 04:30:48 PM
rw-r--r--
📄
tokeniser.py
5.16 KB
03/13/2021 04:30:48 PM
rw-r--r--
Editing: location.py
Close
# encoding: utf-8 """ location.py Created by Thomas Mangin on 2014-06-22. Copyright (c) 2014-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ # ===================================================================== Location # file location class Location(object): def __init__(self, index_line=0, index_column=0, line=''): self.line = line self.index_line = index_line self.index_column = index_column def clear(self): self.index_line = 0 self.index_column = 0 self.line = '' class Error(Exception): tabsize = 3 syntax = '' def __init__(self, location, message, syntax=''): self.line = location.line.replace('\t', ' ' * self.tabsize) self.index_line = location.index_line self.index_column = location.index_column + (self.tabsize - 1) * location.line[: location.index_column].count( '\t' ) self.message = '\n\n'.join( ( 'problem parsing configuration file line %d position %d' % (location.index_line, location.index_column + 1), 'error message: %s' % message.replace('\t', ' ' * self.tabsize), '%s%s' % (self.line, '-' * self.index_column + '^'), ) ) # allow to give the right syntax in using Raised if syntax: self.message += '\n\n' + syntax Exception.__init__(self) def __repr__(self): return self.message