Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IDEA
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Warden
IDEA
Commits
c5f35bc7
Commit
c5f35bc7
authored
Jul 31, 2017
by
Pavel Kácha
Browse files
Options
Downloads
Patches
Plain Diff
Removed string check to be able to take ipranges types themselves
parent
0db81f9c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib_python/lib/ipranges/ipranges.py
+0
-6
0 additions, 6 deletions
lib_python/lib/ipranges/ipranges.py
with
0 additions
and
6 deletions
lib_python/lib/ipranges/ipranges.py
+
0
−
6
View file @
c5f35bc7
...
@@ -243,8 +243,6 @@ IP4Util.net = IP4Net
...
@@ -243,8 +243,6 @@ IP4Util.net = IP4Net
IP6Util
.
net
=
IP6Net
IP6Util
.
net
=
IP6Net
def
from_str
(
s
):
def
from_str
(
s
):
if
not
isinstance
(
s
,
basestring
):
raise
ValueError
(
"
IP string expected, got: %s
"
%
s
)
for
t
in
IP4Net
,
IP4Range
,
IP4
,
IP6Net
,
IP6Range
,
IP6
:
for
t
in
IP4Net
,
IP4Range
,
IP4
,
IP6Net
,
IP6Range
,
IP6
:
try
:
try
:
return
t
(
s
)
return
t
(
s
)
...
@@ -253,8 +251,6 @@ def from_str(s):
...
@@ -253,8 +251,6 @@ def from_str(s):
raise
ValueError
(
"
%s does not appear as IP address, network or range string
"
%
s
)
raise
ValueError
(
"
%s does not appear as IP address, network or range string
"
%
s
)
def
from_str_v4
(
s
):
def
from_str_v4
(
s
):
if
not
isinstance
(
s
,
basestring
):
raise
ValueError
(
"
IPv4 string expected, got: %s
"
%
s
)
for
t
in
IP4Net
,
IP4Range
,
IP4
:
for
t
in
IP4Net
,
IP4Range
,
IP4
:
try
:
try
:
return
t
(
s
)
return
t
(
s
)
...
@@ -263,8 +259,6 @@ def from_str_v4(s):
...
@@ -263,8 +259,6 @@ def from_str_v4(s):
raise
ValueError
(
"
%s does not appear as IPv4 address, network or range string
"
%
s
)
raise
ValueError
(
"
%s does not appear as IPv4 address, network or range string
"
%
s
)
def
from_str_v6
(
s
):
def
from_str_v6
(
s
):
if
not
isinstance
(
s
,
basestring
):
raise
ValueError
(
"
IPv6 string expected, got: %s
"
%
s
)
for
t
in
IP6Net
,
IP6Range
,
IP6
:
for
t
in
IP6Net
,
IP6Range
,
IP6
:
try
:
try
:
return
t
(
s
)
return
t
(
s
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment