Skip to content

Commit 4b498d1

Browse files
thijstriemstraasvetlov
authored andcommitted
use trafaret.IP instead (#2187)
* use trafaret.IP * Create 2187.misc
1 parent c04a75a commit 4b498d1

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

changes/2187.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import trafaret as T
22

3-
4-
primitive_ip_regexp = r'^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$'
5-
63
TRAFARET = T.Dict({
74
T.Key('postgres'):
85
T.Dict({
@@ -14,6 +11,6 @@
1411
'minsize': T.Int(),
1512
'maxsize': T.Int(),
1613
}),
17-
T.Key('host'): T.String(regex=primitive_ip_regexp),
14+
T.Key('host'): T.IP,
1815
T.Key('port'): T.Int(),
1916
})

0 commit comments

Comments
 (0)