diff options
author | Dan Williams <dcbw@localhost.localdomain> | 2006-06-16 17:05:45 (GMT) |
---|---|---|
committer | Dan Williams <dcbw@localhost.localdomain> | 2006-06-16 17:05:45 (GMT) |
commit | 6db22150b1c6619bd60523bb3c383c44da5d09b7 (patch) | |
tree | 16f0676861ae3e8e408426dd0dc911fbb19abb00 /sugar | |
parent | 29fb2321fec21fea36ed5b5b234600ac7de78bb6 (diff) |
Remove unused function
Diffstat (limited to 'sugar')
-rw-r--r-- | sugar/presence/Service.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/sugar/presence/Service.py b/sugar/presence/Service.py index 9219b80..2288936 100644 --- a/sugar/presence/Service.py +++ b/sugar/presence/Service.py @@ -2,28 +2,6 @@ import avahi from sugar import util import string -def new_group_service(group_name, resource): - """Create a new service suitable for defining a new group.""" - if type(group_name) != type("") or not len(group_name): - raise ValueError("group name must be a valid string.") - if type(resource) != type("") or not len(resource): - raise ValueError("group resource must be a valid string.") - - # Create a randomized service type - data = "%s%s" % (group_name, resource) - stype = "_%s_group_olpc._udp" % sugar.util.unique_id(data) - - properties = {__GROUP_NAME_TAG: group_name, __GROUP_RESOURCE_TAG: resource } - owner_nick = "" - port = random.randint(5000, 65000) - # Use random currently unassigned multicast address - address = "232.%d.%d.%d" % (random.randint(0, 254), random.randint(1, 254), - random.randint(1, 254)) - service = Service.Service(owner_nick, stype, "local", address=address, - port=port, properties=properties) - return service - - def _txt_to_dict(txt): """Convert an avahi-returned TXT record formatted as nested arrays of integers (from dbus) into a dict |