Changeset 84 for pykoticon/trunk/bin

Show
Ignore:
Timestamp:
01/24/05 18:55:25 (20 years ago)
Author:
jerome
Message:

Now uses semicolon separated values instead of comma separated
values to not break when dealing with datas coming from an
LDAP server

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykoticon/trunk/bin/pykoticon

    r83 r84  
    140140        """Retrieve datas from the CGI script.""" 
    141141        args = { "report" : 1, 
    142                  "format" : "csv", 
     142                 "format" : "ssv", 
    143143               }   
    144144        args.update(arguments)             
     
    153153            u.close() 
    154154            try : 
    155                 lines = [ line.strip().split(",") for line in lines ] 
     155                lines = [ line.strip().split(";") for line in lines ] 
    156156                fields = [field[1:-1] for field in lines[0]] 
    157157                indices = [fields.index(fname) for fname in fieldnames] 
     
    166166    def getPrinters(self) : 
    167167        """Retrieve the printer's names.""" 
    168         arguments = { "report" : 1, 
    169                       "format" : "csv", 
    170                       "datatype" : "printers", 
     168        arguments = { "datatype" : "printers", 
    171169                    }   
    172170        return self.retrieveDatas(arguments, ["printername", "priceperpage", \