Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.0. DemoStorage Exception #103

Closed
papachoco opened this issue Sep 8, 2016 · 3 comments
Closed

5.0.0. DemoStorage Exception #103

papachoco opened this issue Sep 8, 2016 · 3 comments

Comments

@papachoco
Copy link

Hi,

In line 330 of DemoStorage.py (see below) we are not returning after we calling self.changes.storeBlob so the previous attribute error is always raised.

Thanks a lot,

Carlos

       if self._blobify():
            self.changes.storeBlob(
                oid, oldserial, data, blobfilename, '', transaction)
        raise
@jamadden
Copy link
Member

jamadden commented Sep 8, 2016

Which is now line 383 in master.

The return statement was dropped in 7e1db13#diff-e742b4fd52df56f2e6fcf3042c2fa025L331 ("Switch all storages to the new commit protocol").

I suspect a simple return would take care of it, but presumably this code isn't covered by test cases 😞

@jmuchemb
Copy link
Member

jmuchemb commented Sep 8, 2016

You're right. I removed the returns so that the method always returns None, but I forgot to add a return after the second call to storeBlob (or maybe a else: raise is better).

@jamadden
Copy link
Member

jamadden commented Sep 8, 2016

I'm working on a PR with test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants