~algozino/qr-tools/qrtools2

« back to all changes in this revision

Viewing changes to qrtools/types/mecard/__init__.py

  • Committer: Ramiro Algozino
  • Date: 2012-03-25 21:30:18 UTC
  • Revision ID: algozino@gmail.com-20120325213018-1eqg4lxjge6zzzm5
Fixed bug in recognise method of some data types

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
    def __init__(self):
14
14
        QRCode.__init__(self)
15
15
                    
16
 
    def recognise(self, data_string):
17
 
        return data_lower.startswith(u"mecard:")
 
16
    def recognise(self, data):
 
17
        return data.lower().startswith(u"mecard:")
18
18
 
19
19
    def encode(self, data):
20
20
        return "MECARD:" + ";".join([":".join(i) for i in data]) + ";"