|
From: | Jeff Honey |
Subject: | Re: [Fab-user] variable substitution |
Date: | Tue, 17 Apr 2018 20:07:05 +0000 |
Duh. I should have seen that one coming. The replacement happens on the string immediately preceeding. Brilliant. Very similar to the way printf() works. Thanks, again, Brandon. From: Brandon Whaley <address@hidden> In the first example, you're trying to use a format method that is not supported in python. In your second example, you're using the format operator on the second string instead of the first in the put call. Here's what you should do: def myput(): myvar = env.host_string put('/source/%s-*' % myvar, '/mydest/') On Tue, Apr 17, 2018 at 11:28 AM Jeff Honey <address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |