Loading ...
Sorry, an error occurred while loading the content.

71401Re: [PATCH] (11/7) Consistency and refactoring

Expand Messages
  • ZyX
    Jun 19, 2013
    • 0 Attachment
      Fixes the Note: mentioned before.

      # HG changeset patch
      # User ZyX <kp-pav@...>
      # Date 1371701162 -14400
      # Thu Jun 20 08:06:02 2013 +0400
      # Branch python-fixes
      # Node ID 32abf0ae95195d73a017a8d53af65e9deea20856
      # Parent 38acdea8fd7d2179916c4e67bdc8e54941929093
      Let non-ImportError exceptions pass the finder

      diff -r 38acdea8fd7d -r 32abf0ae9519 src/if_py_both.h
      --- a/src/if_py_both.h Wed Jun 19 23:10:21 2013 +0400
      +++ b/src/if_py_both.h Thu Jun 20 08:06:02 2013 +0400
      @@ -1199,6 +1199,14 @@

      if (!module)
      {
      + if (PyErr_Occurred())
      + {
      + if (PyErr_ExceptionMatches(PyExc_ImportError))
      + PyErr_Clear();
      + else
      + return NULL;
      + }
      +
      Py_INCREF(Py_None);
      return Py_None;
      }
      diff -r 38acdea8fd7d -r 32abf0ae9519 src/testdir/test86.ok
      --- a/src/testdir/test86.ok Wed Jun 19 23:10:21 2013 +0400
      +++ b/src/testdir/test86.ok Thu Jun 20 08:06:02 2013 +0400
      @@ -497,7 +497,7 @@
      > import
      import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',)
      import failing_import:ImportError:('No module named failing_import',)
      -import failing:ImportError:('No module named failing',)
      +import failing:NotImplementedError:()
      > Dictionary
      >> DictionaryConstructor
      vim.Dictionary("abcI"):ValueError:('expected sequence element of size 2, but got sequence of size 1',)
      diff -r 38acdea8fd7d -r 32abf0ae9519 src/testdir/test87.ok
      --- a/src/testdir/test87.ok Wed Jun 19 23:10:21 2013 +0400
      +++ b/src/testdir/test87.ok Thu Jun 20 08:06:02 2013 +0400
      @@ -486,7 +486,7 @@
      > import
      import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
      import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))
      -import failing:(<class 'ImportError'>, ImportError('No module named failing',))
      +import failing:(<class 'NotImplementedError'>, NotImplementedError())
      > Dictionary
      >> DictionaryConstructor
      vim.Dictionary("abcI"):(<class 'ValueError'>, ValueError('expected sequence element of size 2, but got sequence of size 1',))

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 25 messages in this topic