On Mon, May 6, 2013 at 3:01 PM, MMZ <programmer.toro...@gmail.com> wrote:

> I am trying to backup database on CentOS linux server,I'm getting error
> when running the following script. anyone can help?
>
> Traceback (most recent call last):
>   File "./backup.py", line 8, in ?
>     username = config.get('client', 'mmz')
>   File "/usr/lib/python2.4/ConfigParser.py", line 511, in get
>     raise NoSectionError(section)
>

​I've never used ConfigParser, but that ​

​error message looks pretty simple to interpret.  You've set up a
ConfigParser object, told it to read in ~/my.cnf, the asked for the value
of section 'client', option 'mmz'.  The error indicates that your config
files doesn't have a section named 'client'.

What is the content of your ~/my.cnf file?

-- 
Jerry
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to