Discussion:
[Fab-user] abort doubles the output message
Felix Almeida
2015-03-13 19:19:34 UTC
Permalink
Perhaps the line #53 in "site-packages/fabric/utils.py" file should be changed from:

sys.exit(msg)

To:

sys.exit(1)


From: Felix Almeida
Sent: Friday, March 13, 2015 3:11 PM
To: fab-***@nongnu.org
Subject: abort doubles the output message

Hi all,

Please do you know why "abort" (or maybe "fab") is doubling the output? Am I doing something wrong?

If, for instance, I call the following program by typing "fab test" on the command line:
from fabric.api import abort, task

@task()
def test():
abort("end")

I got this output:
Fatal error: end

Aborting.
end

Why is there an extra "end" at the end?
I've started noticing this behavior after I upgrade fabric to version 1.10.1.


Thank you,
Felix





________________________________
This communication is confidential. We only send and receive email on the basis of the terms set out at www.rogers.com/web/content/emailnotice<http://www.rogers.com/web/content/emailnotice>



Ce message est confidentiel. Notre transmission et r?ception de courriels se fait strictement suivant les modalit?s ?nonc?es dans l'avis publi? ? www.rogers.com/aviscourriel <http://www.rogers.com/aviscourriel>
________________________________
Felix Almeida
2015-03-13 19:10:57 UTC
Permalink
Hi all,

Please do you know why "abort" (or maybe "fab") is doubling the output? Am I doing something wrong?

If, for instance, I call the following program by typing "fab test" on the command line:
from fabric.api import abort, task

@task()
def test():
abort("end")

I got this output:
Fatal error: end

Aborting.
end

Why is there an extra "end" at the end?
I've started noticing this behavior after I upgrade fabric to version 1.10.1.


Thank you,
Felix





________________________________
This communication is confidential. We only send and receive email on the basis of the terms set out at www.rogers.com/web/content/emailnotice<http://www.rogers.com/web/content/emailnotice>



Ce message est confidentiel. Notre transmission et r?ception de courriels se fait strictement suivant les modalit?s ?nonc?es dans l'avis publi? ? www.rogers.com/aviscourriel <http://www.rogers.com/aviscourriel>
________________________________
Felix Almeida
2015-03-13 19:25:07 UTC
Permalink
Oh, yes. I've found it:
Change-Id: I22856d54b3d55663d8f11c8ad7efa9871a744c14
Yannis Panousis authored on 22 Oct 2014
bitprophet committed on 19 Dec 2014

Please, can we roll it back?
The abort function already prints the message if the "aborts" output level is set to True, so not sure why this change was introduced.


From: Felix Almeida
Sent: Friday, March 13, 2015 3:20 PM
To: fab-***@nongnu.org
Subject: RE: abort doubles the output message

Perhaps the line #53 in "site-packages/fabric/utils.py" file should be changed from:

sys.exit(msg)

To:

sys.exit(1)


From: Felix Almeida
Sent: Friday, March 13, 2015 3:11 PM
To: fab-***@nongnu.org<mailto:fab-***@nongnu.org>
Subject: abort doubles the output message

Hi all,

Please do you know why "abort" (or maybe "fab") is doubling the output? Am I doing something wrong?

If, for instance, I call the following program by typing "fab test" on the command line:
from fabric.api import abort, task

@task()
def test():
abort("end")

I got this output:
Fatal error: end

Aborting.
end

Why is there an extra "end" at the end?
I've started noticing this behavior after I upgrade fabric to version 1.10.1.


Thank you,
Felix





________________________________
This communication is confidential. We only send and receive email on the basis of the terms set out at www.rogers.com/web/content/emailnotice<http://www.rogers.com/web/content/emailnotice>



Ce message est confidentiel. Notre transmission et r?ception de courriels se fait strictement suivant les modalit?s ?nonc?es dans l'avis publi? ? www.rogers.com/aviscourriel <http://www.rogers.com/aviscourriel>
________________________________
Felix Almeida
2015-03-13 19:37:03 UTC
Permalink
In case there is a good reason for sending the string to the sys.exit function, then maybe we could do the following to avoid printing the message twice:

sys.exit(1 if output.aborts else msg)

Although it doesn't look good to me... :-/


From: Felix Almeida
Sent: Friday, March 13, 2015 3:25 PM
To: fab-***@nongnu.org
Subject: RE: abort doubles the output message

Oh, yes. I've found it:
Change-Id: I22856d54b3d55663d8f11c8ad7efa9871a744c14
Yannis Panousis authored on 22 Oct 2014
bitprophet committed on 19 Dec 2014

Please, can we roll it back?
The abort function already prints the message if the "aborts" output level is set to True, so not sure why this change was introduced.


From: Felix Almeida
Sent: Friday, March 13, 2015 3:20 PM
To: fab-***@nongnu.org<mailto:fab-***@nongnu.org>
Subject: RE: abort doubles the output message

Perhaps the line #53 in "site-packages/fabric/utils.py" file should be changed from:

sys.exit(msg)

To:

sys.exit(1)


From: Felix Almeida
Sent: Friday, March 13, 2015 3:11 PM
To: fab-***@nongnu.org<mailto:fab-***@nongnu.org>
Subject: abort doubles the output message

Hi all,

Please do you know why "abort" (or maybe "fab") is doubling the output? Am I doing something wrong?

If, for instance, I call the following program by typing "fab test" on the command line:
from fabric.api import abort, task

@task()
def test():
abort("end")

I got this output:
Fatal error: end

Aborting.
end

Why is there an extra "end" at the end?
I've started noticing this behavior after I upgrade fabric to version 1.10.1.


Thank you,
Felix





________________________________
This communication is confidential. We only send and receive email on the basis of the terms set out at www.rogers.com/web/content/emailnotice<http://www.rogers.com/web/content/emailnotice>



Ce message est confidentiel. Notre transmission et r?ception de courriels se fait strictement suivant les modalit?s ?nonc?es dans l'avis publi? ? www.rogers.com/aviscourriel <http://www.rogers.com/aviscourriel>
________________________________

Loading...