public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-python/python-dateutil/files: python-dateutil-2.1-open-utf-8.patch
@ 2012-04-04  2:54 Mike Gilbert (floppym)
  0 siblings, 0 replies; only message in thread
From: Mike Gilbert (floppym) @ 2012-04-04  2:54 UTC (permalink / raw
  To: gentoo-commits

floppym     12/04/04 02:54:29

  Added:                python-dateutil-2.1-open-utf-8.patch
  Log:
  Fix UnicodeDecodeError in setup.py. Bug 410725.
  
  (Portage version: 2.2.0_alpha99/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  dev-python/python-dateutil/files/python-dateutil-2.1-open-utf-8.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/python-dateutil/files/python-dateutil-2.1-open-utf-8.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/python-dateutil/files/python-dateutil-2.1-open-utf-8.patch?rev=1.1&content-type=text/plain

Index: python-dateutil-2.1-open-utf-8.patch
===================================================================
Fix UnicodeDecodeError in setup.py.

https://bugs.gentoo.org/show_bug.cgi?id=410725
--- setup.py
+++ setup.py
@@ -1,5 +1,6 @@
 #!/usr/bin/python
 from os.path import isfile, join
+import codecs
 import glob
 import os
 import re
@@ -13,7 +14,7 @@
 
 TOPDIR = os.path.dirname(__file__) or "."
 VERSION = re.search('__version__ = "([^"]+)"',
-                    open(TOPDIR + "/dateutil/__init__.py").read()).group(1)
+                    codecs.open(TOPDIR + "/dateutil/__init__.py", encoding='utf-8').read()).group(1)
 
 
 setup(name="python-dateutil",






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-04  2:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04  2:54 [gentoo-commits] gentoo-x86 commit in dev-python/python-dateutil/files: python-dateutil-2.1-open-utf-8.patch Mike Gilbert (floppym)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox