From 2840af85ce3b7d998a356f5606ce0d6637b4092e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 22 Jun 2006 18:05:38 +0000 Subject: Stop abusing ZeroConf by overloading the service type field; overload the service name field instead like everyone else does --- (limited to 'sugar/util.py') diff --git a/sugar/util.py b/sugar/util.py index 4f83751..bfddf32 100644 --- a/sugar/util.py +++ b/sugar/util.py @@ -22,18 +22,18 @@ def unique_id(data = ''): return _stringify_sha(_sha_data(data_string)) -ACTIVITY_UID_LEN = 40 +ACTIVITY_ID_LEN = 40 def is_hex(s): return s.strip(string.hexdigits) == '' -def validate_activity_uid(uid): - """Validate an activity UID.""" - if type(uid) != type("") and type(uid) != type(u""): +def validate_activity_id(actid): + """Validate an activity ID.""" + if type(actid) != type("") and type(actid) != type(u""): return False - if len(uid) != ACTIVITY_UID_LEN: + if len(actid) != ACTIVITY_ID_LEN: return False - if not is_hex(uid): + if not is_hex(actid): return False return True -- cgit v0.9.1