[PATCH] encoding fix

Wouter Bolsterlee uws at xs4all.nl
Fri Mar 24 13:45:29 GMT 2006


På Fri, Mar 24, 2006 at 01:54:55PM +0100, Olaf Conradi skrev:
> === modified file 'a/bzrlib/osutils.py'
> --- a/bzrlib/osutils.py	
> +++ b/bzrlib/osutils.py	
> @@ -187,6 +187,8 @@
>      # os.getcwd() returns a non-sys.getdefaultencoding()-encoded
>      # string.
>      _fs_enc = sys.getfilesystemencoding()
> +    if _fs_enc is None:
> +       _fs_enc = 'ascii'
>      def abspath(path):
>          return os.path.abspath(path.encode(_fs_enc)).decode(_fs_enc)

This works too and looks cleaner imho:

  _fs_enc = sys.getfilesystemencoding() or 'ascii'

  mvrgr, Wouter

-- 
:wq                                                       mail uws at xs4all.nl
                                                      web http://uwstopia.nl

i want you to come :: walk this world with me                -- heather nova
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060324/31f55e12/attachment.pgp 


More information about the bazaar mailing list