[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] put() issue
From: |
Jeff Forcier |
Subject: |
Re: [Fab-user] put() issue |
Date: |
Mon, 22 Jun 2009 19:31:15 -0400 |
On Mon, Jun 15, 2009 at 3:32 PM, Steve Steiner
(listsin)<address@hidden> wrote:
>
> So, my question is, what is the best way to handle both of these things?
>
> I think the exception on a missing local file should be caught in case we're
> running in --warn-only, right?
I'm actually not sure. --warn-only isn't intended as a "ignore all
failures of any kind, including Python exceptions", but as a way of
marking that nonzero error codes from run/sudo/local do not
necessarily constitute a fatal error.
Python exceptions, on the other hand, always (I think) indicate a
fatal error: a syntax error, adding 1+"bob", calling run() with no
arguments, or...trying to operate on a nonexistent local file.
However, I note that yes, we are wrapping the sftp.put calls in order
to allow --warn-only to prevent the error in question from becoming
fatal. In retrospect I'm not actually sure that's the best idea, if we
want to make my above thoughts into a policy, since it's inconsistent
with the idea of "only use warn-only for stuff that is SUPPOSED to
fail". Feel free to offer opinions on this :)
> The message "No such file" doesn't really capture the essence of what
> happened but I'm not sure of where and by whom it's generated so it can be
> smartened up.
It's a Paramiko or remote-system error message, not something we have
a ton of control over unless we're super lucky and the exception class
is very specific -- I've not had good luck with that in Paramiko,
sadly. Feel free to dig deeper and see if this is the case or not.
-Jeff