~ubuntu-branches/ubuntu/natty/python3.1/natty-security

« back to all changes in this revision

Viewing changes to debian/patches/bdist-wininst-notfound.diff

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-07-06 16:52:42 UTC
  • mfrom: (1.2.1 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100706165242-2xv4i019r3et6c0j
Tags: 3.1.2+20100706-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.
  - Add debian/patches/overwrite-semaphore-check for Lucid buildds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: suggest installation of the pythonX.Y-dev package, if bdist_wininst
 
2
# DP: cannot find the wininst-* files.
 
3
 
 
4
--- a/Lib/distutils/command/bdist_wininst.py
 
5
+++ b/Lib/distutils/command/bdist_wininst.py
 
6
@@ -340,4 +340,7 @@
 
7
             sfix = ''
 
8
 
 
9
         filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix))
 
10
-        return open(filename, "rb").read()
 
11
+        try:
 
12
+            return open(filename, "rb").read()
 
13
+        except IOError as e:
 
14
+            raise DistutilsFileError(str(e) + ', please install the python%s-dev package' % sys.version[:3])