python backup script

Jerry Hill malaclypse2 at gmail.com
Mon May 6 15:11:33 EDT 2013


On Mon, May 6, 2013 at 3:01 PM, MMZ <programmer.toronto at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130506/cc979329/attachment.html>


More information about the Python-list mailing list