X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=sfatables%2Fcommands%2Fmoo.py;fp=sfatables%2Fcommands%2Fmoo.py;h=8104b243b9071d9258f4fd408e755bfc648a5731;hp=3860e3cd23d76182b345dc7bd026df66505b0575;hb=04acd3228e5911d36d0cd58dc35b9319fc558e17;hpb=e5537b113b6fe5874fdcd5b12414568500aa106c diff --git a/sfatables/commands/moo.py b/sfatables/commands/moo.py index 3860e3cd..8104b243 100644 --- a/sfatables/commands/moo.py +++ b/sfatables/commands/moo.py @@ -1,6 +1,5 @@ import os, time -from sfa.util.py23 import StringType class Command: commandline_options = [] @@ -154,7 +153,7 @@ class Command: # Strings are a special case. Accept either unicode or str # types if a string is expected. - if issubclass(expected_type, StringType) and isinstance(value, StringType): + if issubclass(expected_type, str) and isinstance(value, str): pass # Integers and long integers are also special types. Accept @@ -169,7 +168,7 @@ class Command: name) # If a minimum or maximum (length, value) has been specified - if issubclass(expected_type, StringType): + if issubclass(expected_type, str): if min is not None and \ len(value.encode(self.api.encoding)) < min: raise SfaInvalidArgument("%s must be at least %d bytes long" % (name, min))