fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] TypeError with upload_template


From: Dominique Guardiola
Subject: Re: [Fab-user] TypeError with upload_template
Date: Thu, 20 Oct 2011 12:20:39 +0200

Answering to myself : I had a "%" not related with the formatting in the 
vhost.txt file, I escaped it using %% and voila...

Now I have

Fatal error: sudo() encountered an error (return code 1) while executing 'mv 
"efa357f1b53c496906d8aaa3d2d6919d5fa901f6" 
"/etc/apache2/sites-available/dev.django.coop"'

but that's probably another thread...



Le 20 oct. 2011 à 12:11, Dominique Guardiola a écrit :

> Hi
> 
> this is my first fabric script
> Looks like I have an error in this part , but I'm unable to find out what 
> causes it :
> 
> vhost_context = {
>            'user' : env.user,
>            'domain' : env.domain,
>            'projet' : env.projet
>        }
> with cd('/etc/apache2'):
>    upload_template(   'vhost.txt',
>                       'sites-available/%(domain)s' % env,                     
> `
>                       context=vhost_context,use_sudo=True)
> 
> The vhost.txt file is at the same level as the fabfile.py
> 
> the error says :
> 
> File "/Users/dom/VM/devcoop/fabfile.py", line 140, in apache_vhost
>    upload_template('vhost.txt', 'sites-available/%(domain)s' % env, 
> context=vhost_context,use_sudo=True)
>  File 
> "/Library/Python/2.7/site-packages/Fabric-1.3a._2faf457_-py2.7.egg/fabric/contrib/files.py",
>  line 110, in upload_template
>    text = text % context
> TypeError: not enough arguments for format string
> 
> 
> thanks for your help!
> 
> --
> Dominique Guardiola, QUINODE
>http://www.quinode.fr/
> • Tel : 04.27.86.84.37
> • Mob : 06.15.13.22.27
> 
> 
> 
> 
> 
> _______________________________________________
> Fab-user mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fab-user

--
Dominique Guardiola, QUINODE
• http://www.quinode.fr/
• Tel : 04.27.86.84.37
• Mob : 06.15.13.22.27





Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]