Rev 44: Handle another failure condition on win32. in http://bazaar.launchpad.net/~jameinel/launchpadlib/win32

John Arbash Meinel john at arbash-meinel.com
Thu Jul 9 16:34:45 BST 2009


At http://bazaar.launchpad.net/~jameinel/launchpadlib/win32

------------------------------------------------------------
revno: 44
revision-id: john at arbash-meinel.com-20090709153419-jcj94izlqpcn5vep
parent: john at arbash-meinel.com-20090709140254-5nmrkoss3jbekg80
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: win32
timestamp: Thu 2009-07-09 10:34:19 -0500
message:
  Handle another failure condition on win32.
  
  It seems that 'mkdtemp()' will return a Unicode string on windows,
  and launchpadlib was only trapping plain 'str' objects to turn them
  into MultipleRepresentationCache objects.
-------------- next part --------------
=== modified file 'src/launchpadlib/_browser.py'
--- a/src/launchpadlib/_browser.py	2009-03-20 20:46:06 +0000
+++ b/src/launchpadlib/_browser.py	2009-07-09 15:34:19 +0000
@@ -187,7 +187,7 @@
         if cache is None:
             cache = tempfile.mkdtemp()
             atexit.register(shutil.rmtree, cache)
-        if isinstance(cache, str):
+        if isinstance(cache, basestring): # On win32 mkdtemp returns Unicode
             cache = MultipleRepresentationCache(cache)
         self._connection = OAuthSigningHttp(
             credentials, cache, timeout, proxy_info)



More information about the bazaar-commits mailing list