From 6f337e0b14f022e942c723ddcad89279f727a099 Mon Sep 17 00:00:00 2001 From: John (J5) Palmieri Date: Tue, 03 Oct 2006 21:06:48 +0000 Subject: Changed all type checking to use isinstance --- (limited to 'sugar/util.py') diff --git a/sugar/util.py b/sugar/util.py index 1584fd8..e664e3b 100644 --- a/sugar/util.py +++ b/sugar/util.py @@ -43,7 +43,7 @@ def is_hex(s): def validate_activity_id(actid): """Validate an activity ID.""" - if type(actid) != type("") and type(actid) != type(u""): + if not isinstance(actid, str) and not isinstance(actid, unicode): return False if len(actid) != ACTIVITY_ID_LEN: return False -- cgit v0.9.1