File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ requests==2.2.1
33celery == 3.1.11
44gevent == 1.0.0
55redis == 2.9.1
6+ six == 1.9.0
Original file line number Diff line number Diff line change 2121
2222import time
2323import uuid
24+ import six
2425from snowplow_tracker import payload , _version
2526from snowplow_tracker import subject as _subject
2627from contracts import contract , new_contract
4445
4546class Tracker :
4647
47- new_contract ("non_empty_string" , lambda s : isinstance (s , str )
48+ new_contract ("non_empty_string" , lambda s : isinstance (s , six . string_types )
4849 and len (s ) > 0 )
49- new_contract ("string_or_none" , lambda s : (isinstance (s , str )
50+ new_contract ("string_or_none" , lambda s : (isinstance (s , six . string_types )
5051 and len (s ) > 0 ) or s is None )
5152 new_contract ("payload" , lambda s : isinstance (s , payload .Payload ))
5253
You can’t perform that action at this time.
0 commit comments