[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] problem w/ pydrive
From: |
edgar . soldin |
Subject: |
Re: [Duplicity-talk] problem w/ pydrive |
Date: |
Wed, 1 Mar 2017 17:09:45 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 |
sometimes i am ;).. do you need a branch or can you quickly remove it in your
working copy?
..ede
On 01.03.2017 17:06, Kenneth Loafman wrote:
> You are correct. Within __init__() a failure would cause the backend class
> to fail and produce a traceback. Since the class is not initialized unless
> used, removing the try/except would cause no harm. Then backend.py could
> catch the error in get_backend_object:208. [Why is it looking for an
> ImportError there since the importing is done in import_backends:80. Maybe
> some dead code?]
>
>
> On Wed, Mar 1, 2017 at 9:27 AM, <address@hidden <mailto:address@hidden>>
> wrote:
>
> hey Ken,
>
> i assume that <report ...> is pseudo code for printing the error w/
> stack, or? why is that more elegant than rewrapping the error stack and have
> the calling code deal w/ the exception?
>
> but why catch it at all, if an init error fails the backend anyway?
>
> ..ede
>
> On 01.03.2017 16:16, Kenneth Loafman wrote:
> > Correction:
> >
> > try:
> > import foo
> > import bar
> > except ImportError as e:
> > <report import error and read manual>
> > <report exception from str(e)>
> > raise
> > except Exception as e:
> > <report exception and str(e)>
> > raise
> >
> > On Wed, Mar 1, 2017 at 9:07 AM, Kenneth Loafman <address@hidden
> <mailto:address@hidden> <mailto:address@hidden <mailto:address@hidden>>>
> wrote:
> >
> > ede,
> >
> > More like the following:
> >
> > try:
> > import foo
> > import bar
> > except ImportError:
> > <report import error and read manual>
> > raise
> > except Exception as e:
> > <report exception and str(e)>
> > raise
> >
> > ...Ken
> >
> >
> > On Tue, Feb 28, 2017 at 6:25 PM, <address@hidden
> <mailto:address@hidden> <mailto:address@hidden <mailto:address@hidden>>>
> wrote:
> >
> > Ken,
> >
> > any hint on how? something like this
> >
> http://stackoverflow.com/questions/3847503/wrapping-exceptions-in-python
> <http://stackoverflow.com/questions/3847503/wrapping-exceptions-in-python>
> <http://stackoverflow.com/questions/3847503/wrapping-exceptions-in-python
> <http://stackoverflow.com/questions/3847503/wrapping-exceptions-in-python>>
> > ?
> >
> > easiest would be probably to simply get rid of the try catch,
> but then we would loose the "check the manpage" text.
> >
> > ..ede
> >
> > On 28.02.2017 20:52, Kenneth Loafman wrote:
> > > Edgar, I've see it done, so yes.
> > >
> > > Douglas, could you report this as a bug?
> > >
> > > ...Thanks,
> > > ...Ken
> > >
> > >
> > > On Tue, Feb 28, 2017 at 1:18 PM Douglas J Hunley
> <address@hidden <mailto:address@hidden> <mailto:address@hidden
> <mailto:address@hidden>>>
> > > wrote:
> > >
> > >>
> > >> On Tue, Feb 28, 2017 at 1:51 PM, <address@hidden
> <mailto:address@hidden> <mailto:address@hidden <mailto:address@hidden>>>
> wrote:
> > >>
> > >> would you agree that the error should be visible, instead of
> the vague
> > >> message?
> > >>
> > >>
> > >> Good lord yes! :)
> > >>
> > >>
> > >>
> > >> --
> > >> {
> > >> "name": "douglas j hunley",
> > >> "email": "address@hidden <mailto:address@hidden>
> <mailto:address@hidden <mailto:address@hidden>>",
> > >> "social": [
> > >> {
> > >> "blog": "https://hunleyd.github.io/",
> > >> "twitter": "@hunleyd"
> > >> }
> > >> ]
> > >> }
> > >>
> > >
> >
> >
> >
>
>