Re: how do I retry a command only for a specific exception / error

2018-03-21 Thread Ganesh Pal
Please ensure quoted text is quoted, and new text you write is unquoted. > That way you are more likely to get useful > Sorry , Steve I didn't realize but thanks for pointing out I will take care I was on a mobile phone and messed the quoted text >Something like this should do it. It gives up imm

Re: how do I retry a command only for a specific exception / error

2018-03-20 Thread Steven D'Aprano
On Mon, 19 Mar 2018 22:08:09 +0530, Ganesh Pal wrote: I'm sorry Ganesh, you have appeared to have just quoted my post without writing anything new. (I haven't taken the time to read your post in fine detail.) Apart from "Regards, Ganesh" at the very end, everything is quoted text (starting with

Re: how do I retry a command only for a specific exception / error

2018-03-19 Thread Ganesh Pal
On Fri, Mar 16, 2018 at 11:21 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Fri, 16 Mar 2018 11:04:22 +0530, Ganesh Pal wrote: > > > All that I am trying to do here is write a generic function that will > > re-retry > > the command few more times before failing the tes

Re: how do I retry a command only for a specific exception / error

2018-03-15 Thread Steven D'Aprano
On Fri, 16 Mar 2018 11:04:22 +0530, Ganesh Pal wrote: > All that I am trying to do here is write a generic function that will > re-retry > the command few more times before failing the test Something like this should do it. It gives up immediately on fatal errors and tries again on temporary

how do I retry a command only for a specific exception / error

2018-03-15 Thread Ganesh Pal
-g groupname] [-d] [-m] [-u] [-v] Failed, Retrying in 4 seconds... Case 3: Assuming my command threw an exception say OSError , how do I retry a command only for a specific exception / error I am on Python 2.7 and Linux Regards, Ganesh Pal -- https://mail.python.org/mailman/listinfo/python-list