Mantis BugTracker for CapiSuite
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000032 [CapiSuite] 3rd-party-tools feature always 2003-05-29 16:21 2004-02-20 16:19
Reporter Eckhard Rüggeberg View Status public  
Assigned To gernot
Priority normal Resolution not fixable  
Status closed   Product Version
Summary 0000032: whitespace in configfile leads to parser errors
Description I am used to use indentation in config files with several sections, like /etc/samba/smb.conf:
[global]
        workgroup = TUX-NET
    ...
[printers]
        comment = All Printers
    ...
If I try this in e.g. /etc/capisuite/fax.conf, I get parser errors for the
capisuitefax script.
Additional Information smyrno:/home/eckhard 298 > capisuitefax -d 9 /usr/share/ghostscript/7.05/examples/tiger.ps
Traceback (most recent call last):
  File "/usr/bin/capisuitefax", line 112, in ?
    config=cs_helpers.readConfig()
  File "/usr/lib/python2.2/site-packages/cs_helpers.py", line 27, in readConfig
    config.readfp(open(configfile_fax))
  File "/usr/lib/python2.2/ConfigParser.py", line 250, in readfp
    self.__read(fp, filename)
  File "/usr/lib/python2.2/ConfigParser.py", line 472, in __read
    raise e
ConfigParser.ParsingError: File contains parsing errors: /etc/capisuite/fax.conf
        [line 143]: ' fax_action = "MailAndSave"\n'
Attached Files

- Relationships

- Notes
(0000031)
gernot
2003-05-29 18:54

This isn't too easy as the parser is a part of the python standard library. Will see if I can place a feature request there...
 
(0000097)
gernot
2004-02-20 16:19

I now checked this in more detail.

It's not possible to ignore leading whitespaces as the Python ConfigParser supports continuation lines which are recognized by leading whitespaces.

Thus you can break up a long value by doing

[section]
myaddress="Gernot Hillier
    Example Street 5
    Bavaria"

Therefore, leading whitespaces have a special meaning for the ConfigParser...
 

- Issue History
Date Modified Username Field Change
2004-02-20 16:16 gernot Status new => assigned
2004-02-20 16:16 gernot Assigned To  => gernot
2004-02-20 16:19 gernot Status assigned => resolved
2004-02-20 16:19 gernot Resolution open => not fixable
2004-02-20 16:19 gernot Note Added: 0000097
2004-02-20 16:19 gernot Status resolved => closed


Mantis 0.19.2
Copyright © 2000 - 2004 Mantis Group
138 total queries executed.
21 unique queries executed.