Rev 4695: Fix bug #430645, don't issue a warning when failing to import _readdir_pyx the second time. in http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b1-no_win_warning

John Arbash Meinel john at arbash-meinel.com
Wed Sep 16 12:59:22 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b1-no_win_warning

------------------------------------------------------------
revno: 4695
revision-id: john at arbash-meinel.com-20090916115914-37h5y0tgfp2o4tyl
parent: pqm at pqm.ubuntu.com-20090916085926-banjevqh63n93xqb
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1.0b1-no_win_warning
timestamp: Wed 2009-09-16 06:59:14 -0500
message:
  Fix bug #430645, don't issue a warning when failing to import _readdir_pyx the second time.
  
  We will still warn if it isn't available for walking directories,
  we just ignore it when it is only being used for a fairly simple function.
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2009-09-16 07:47:47 +0000
+++ b/NEWS	2009-09-16 11:59:14 +0000
@@ -52,6 +52,9 @@
   the partial packs created during the conversion not being consolidated
   at the end of the conversion process. (Robert Collins, #423818)
 
+* Don't give a warning on Windows when failing to import ``_readdir_pyx``
+  as it is never built. (John Arbash Meinel, #430645)
+
 * Don't restrict the command name used to run the test suite.
   (Vincent Ladeuil, #419950)
 

=== modified file 'bzrlib/osutils.py'
--- a/bzrlib/osutils.py	2009-09-11 06:39:56 +0000
+++ b/bzrlib/osutils.py	2009-09-16 11:59:14 +0000
@@ -1828,7 +1828,8 @@
             from bzrlib._readdir_pyx import UTF8DirReader
             file_kind_from_stat_mode = UTF8DirReader().kind_from_mode
         except ImportError, e:
-            failed_to_load_extension(e)
+            # This is one time where we won't warn that an extension failed to
+            # load. The extension is never available on Windows anyway.
             from bzrlib._readdir_py import (
                 _kind_from_mode as file_kind_from_stat_mode
                 )



More information about the bazaar-commits mailing list