Ah very good idea :)
thanks !
Le 30/03/2011 14:48, Daniel Pope a écrit :
On Wed, Mar 30, 2011 at 02:35:50PM +0200, Morgan LEFIEUX wrote:
It could prevent from writing multiple tests before starting a
command, for exemple:
Why not write a helper function?
def runasroot(*args, **kwargs):
if env.user == 'root':
return run(*args, **kwargs)
else:
return sudo(*args, **kwargs)
_______________________________________________
Fab-user mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/fab-user
_______________________________________________
Fab-user mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/fab-user