File: thirdparty.py

package info (click to toggle)
python-aprslib 0.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 352 kB
  • sloc: python: 2,973; makefile: 216
file content (21 lines) | stat: -rw-r--r-- 449 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import re
from aprslib.parsing.__init__ import parse
from aprslib.exceptions import UnknownFormat
from aprslib.exceptions import ParseError

__all__ = [
        'parse_thirdparty',
        ]

def parse_thirdparty(body):
    parsed = {'format':'thirdparty'}

    # Parse sub-packet
    try:
        subpacket = parse(body)
    except (UnknownFormat,ParseError) as ukf:
        raise

    parsed.update({'subpacket':subpacket})

    return('',parsed)