[tor-commits] [bridgedb/develop] Add deprecation note in docstring of Bridges.is_valid_ip().
isis at torproject.org
isis at torproject.org
Wed Mar 12 06:21:02 UTC 2014
commit e91da017b0495a83d49c06086935a7efd5f9f7a1
Author: Isis Lovecruft <isis at torproject.org>
Date: Wed Mar 12 00:45:38 2014 +0000
Add deprecation note in docstring of Bridges.is_valid_ip().
---
lib/bridgedb/Bridges.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py
index e5d5921..b950bc3 100644
--- a/lib/bridgedb/Bridges.py
+++ b/lib/bridgedb/Bridges.py
@@ -38,10 +38,14 @@ HEX_DIGEST_LEN = 40
DIGEST_LEN = 20
PORTSPEC_LEN = 16
+
def is_valid_ip(ip):
"""Return True if ip is the string encoding of a valid IPv4 address,
and False otherwise.
+ XXX this should probably be deprecated in favour of
+ :func:`bridgedb.parse.addr.isValid`.
+
>>> from bridgedb import Bridges
>>> Bridges.is_valid_ip('1.2.3.4')
True
More information about the tor-commits
mailing list