mirror of
https://github.com/dh1tw/pyhamtools.git
synced 2025-12-06 06:52:00 +01:00
callinfo: handle specific unicode strings
This commit is contained in:
parent
1b0073fb0c
commit
7b40e6c7ed
|
|
@ -215,7 +215,7 @@ class Callinfo(object):
|
||||||
#make sure that the remaining part is actually a callsign (avoid: OZ/JO81)
|
#make sure that the remaining part is actually a callsign (avoid: OZ/JO81)
|
||||||
rest = re.search('/[A-Z0-9]+', entire_callsign)
|
rest = re.search('/[A-Z0-9]+', entire_callsign)
|
||||||
if rest is None:
|
if rest is None:
|
||||||
self._logger.warning("non latin characters in callsign '{0}'".format(entire_callsign))
|
self._logger.warning(u"non latin characters in callsign '{0}'".format(entire_callsign))
|
||||||
raise KeyError
|
raise KeyError
|
||||||
rest = re.sub('/', '', rest.group(0))
|
rest = re.sub('/', '', rest.group(0))
|
||||||
if re.match('^[\\d]{0,1}[A-Z]{1,2}\\d([A-Z]{1,4}|\\d{3,3}|\\d{1,3}[A-Z])[A-Z]{0,5}$', rest):
|
if re.match('^[\\d]{0,1}[A-Z]{1,2}\\d([A-Z]{1,4}|\\d{3,3}|\\d{1,3}[A-Z])[A-Z]{0,5}$', rest):
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue