Skip to content

Commit

Permalink
add new type support for 'hostport'
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinAzoff committed Feb 10, 2017
1 parent 8ef331d commit 78a4b35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ninfo/util.py
Expand Up @@ -32,6 +32,11 @@ def get_type(arg):
ipver = isip(arg)
if ipver:
return ip_types[(ipver, '/' in arg)]

parts = arg.split(':')
if len(parts) == 2 and parts[1].isdigit():
return 'hostport'

if '.' in arg:
return 'hostname'

Expand Down

0 comments on commit 78a4b35

Please sign in to comment.