Skip to content

Commit

Permalink
use trafaret.IP instead (#2187)
Browse files Browse the repository at this point in the history
* use trafaret.IP

* Create 2187.misc
  • Loading branch information
thijstriemstra authored and asvetlov committed Aug 10, 2017
1 parent c04a75a commit 4b498d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions changes/2187.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

5 changes: 1 addition & 4 deletions demos/polls/aiohttpdemo_polls/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import trafaret as T


primitive_ip_regexp = r'^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$'

TRAFARET = T.Dict({
T.Key('postgres'):
T.Dict({
Expand All @@ -14,6 +11,6 @@
'minsize': T.Int(),
'maxsize': T.Int(),
}),
T.Key('host'): T.String(regex=primitive_ip_regexp),
T.Key('host'): T.IP,
T.Key('port'): T.Int(),
})

0 comments on commit 4b498d1

Please sign in to comment.