Re: try/exception - error block

2014-08-04 Thread Cameron Simpson
On 03Aug2014 10:39, Roy Smith wrote: In article , bruce wrote: I'm posting the test code I'm using. Pointers/comments would be helpful/useful. It would be really helpful if you could post a minimal code example which demonstrates the problem you're having. Leave out everything (including th

Re: try/exception - error block

2014-08-04 Thread Grant Edwards
On 2014-08-03, Roy Smith wrote: > In article , > Mark Lawrence wrote: > >> How to go about this is at "Short, Self Contained, Correct (Compilable), >> Example" at http://sscce.org/ > > It says there, "most readers will stop reading by 100 lines of code". I > guess I have a short attention spa

Re: try/exception - error block

2014-08-03 Thread Steven D'Aprano
You also posted this question to the tu...@python.org mailing list, which is where I gave an answer. This is a much better place, so I'll re-post the most important parts of my answer here. If you read nothing else, scroll down to the end and read the last part of my comment. bruce wrote: > I ha

Re: try/exception - error block

2014-08-03 Thread Peter Otten
bruce wrote: > Hi. > > I have a long running process, it generates calls to a separate py > app. The py app appears to generate errors, as indicated in the > /var/log/messages file for the abrtd daemon.. The errors are > intermittent. > > So, to quickly capture all possible exceptions/errors, I

Re: try/exception - error block

2014-08-03 Thread bruce
Hi Alan. Yep, the err file in the exception block gets created. and the weird thing is it matches the time of the abrtd information in the /var/log/messages log.. Just nothing in the file! On Sun, Aug 3, 2014 at 4:01 PM, Alan Gauld wrote: > On 03/08/14 18:52, bruce wrote: > >>> but in all tha

Re: try/exception - error block

2014-08-03 Thread CHIN Dihedral
On Sunday, August 3, 2014 10:39:19 PM UTC+8, Roy Smith wrote: > In article , > > bruce wrote: > > > > > I'm posting the test code I'm using. Pointers/comments would be > > > helpful/useful. > > > > It would be really helpful if you could post a minimal code example > > which demonstrat

Re: try/exception - error block

2014-08-03 Thread Alan Gauld
On 03/08/14 18:52, bruce wrote: but in all that.. no one could tell me .. why i'm not getting any errs/exceptions in the err file which gets created on the exception!!! Does the file actually get created? Do you see the print statement output - are they what you expect? Did you try the things

Re: try/exception - error block

2014-08-03 Thread Chris Angelico
On Mon, Aug 4, 2014 at 3:52 AM, bruce wrote: > chris.. my bad.. I wasnt intending to mail you personally. > > Or I wouldn't have inserted the "thanks guys"! > > >> thanks guys... >> >> but in all that.. no one could tell me .. why i'm not getting any >> errs/exceptions in the err file which gets c

Re: try/exception - error block

2014-08-03 Thread bruce
chris.. my bad.. I wasnt intending to mail you personally. Or I wouldn't have inserted the "thanks guys"! > thanks guys... > > but in all that.. no one could tell me .. why i'm not getting any > errs/exceptions in the err file which gets created on the exception!!! > > but thanks for the informat

Re: try/exception - error block

2014-08-03 Thread Chris Angelico
On Mon, Aug 4, 2014 at 2:27 AM, Roy Smith wrote: > It says there, "most readers will stop reading by 100 lines of code". I > guess I have a short attention span relative to "most readers", because > my tl;dnr threshold is a lot shorter than that. "by" 100 lines includes everyone who stops at 10

Re: try/exception - error block

2014-08-03 Thread Roy Smith
In article , Mark Lawrence wrote: > How to go about this is at "Short, Self Contained, Correct (Compilable), > Example" at http://sscce.org/ It says there, "most readers will stop reading by 100 lines of code". I guess I have a short attention span relative to "most readers", because my tl;

Re: try/exception - error block

2014-08-03 Thread Mark Lawrence
On 03/08/2014 15:29, bruce wrote: [snipped to bits] Please see this http://sscce.org/ as already requested on the main mailing list. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/lis

Re: try/exception - error block

2014-08-03 Thread Mark Lawrence
On 03/08/2014 15:39, Roy Smith wrote: In article , bruce wrote: I'm posting the test code I'm using. Pointers/comments would be helpful/useful. It would be really helpful if you could post a minimal code example which demonstrates the problem you're having. Leave out everything (including

Re: try/exception - error block

2014-08-03 Thread Roy Smith
In article , bruce wrote: > I'm posting the test code I'm using. Pointers/comments would be > helpful/useful. It would be really helpful if you could post a minimal code example which demonstrates the problem you're having. Leave out everything (including the commented-out code) which isn't

try/exception - error block

2014-08-03 Thread bruce
Hi. I have a long running process, it generates calls to a separate py app. The py app appears to generate errors, as indicated in the /var/log/messages file for the abrtd daemon.. The errors are intermittent. So, to quickly capture all possible exceptions/errors, I decided to wrap the entire "ma