Changeset 4f37a98


Ignore:
Timestamp:
2012-02-11T17:18:46Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
dcf155d
Parents:
eb54f56
Message:

convert_purple fix: Don't barf on protocols without passwords. Bug #877.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/convert_purple.py

    reb54f56 r4f37a98  
    3535                protocol = acc.getElementsByTagName('protocol')[0].firstChild.wholeText
    3636                name = acc.getElementsByTagName('name')[0].firstChild.wholeText
    37                 password = acc.getElementsByTagName('password')[0].firstChild.wholeText
     37                try:
     38                        password = acc.getElementsByTagName('password')[0].firstChild.wholeText
     39                except IndexError:
     40                        password = ''
    3841                if protocol.startswith('prpl-'):
    3942                        protocol = protocol[5:]
     
    5356        print
    5457        for acc in accs:
    55                 print 'account add %s %s %s' % acc
     58                print 'account add %s %s "%s"' % acc
    5659
    5760def bitlbee_x(*args):
     
    8588       
    8689        print
    87         print 'Write the following XML data to a file called %s.xml (rename it if'
     90        print 'Write the following XML data to a file called %s.xml (rename it if' % user.lower()
    8891        print 'you want to use a different nickname). It should be in the directory where'
    8992        print 'your BitlBee account files are stored (most likely /var/lib/bitlbee).'
Note: See TracChangeset for help on using the changeset viewer.