~ubuntu-branches/ubuntu/trusty/python2.5/trusty

« back to all changes in this revision

Viewing changes to debian/patches/tk8.5-compat.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-01-31 20:41:23 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100131204123-vourxnj86g6up33x
Tags: 2.5.5-1ubuntu1
* Merge with Debian; remaining changes:
  - Include the pregenerated documentation.
  - Set priority of python2.5-minimal to required.
  - Build python2.5-doc from the pregenerated documentation.
* Regenerate the included documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh -e
 
2
 
 
3
dir=
 
4
if [ $# -eq 3 -a "$2" = '-d' ]; then
 
5
    pdir="-d $3"
 
6
    dir="$3/"
 
7
elif [ $# -ne 1 ]; then
 
8
    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
 
9
    exit 1
 
10
fi
 
11
case "$1" in
 
12
    -patch)
 
13
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
 
14
        ;;
 
15
    -unpatch)
 
16
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
 
17
        ;;
 
18
    *)
 
19
        echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
 
20
        exit 1
 
21
esac
 
22
exit 0
 
23
 
 
24
# DP: Fix python2.5 / tk8.5 incompatibility (http://bugs.python.org/issue2693)
 
25
 
 
26
--- Lib/idlelib/WidgetRedirector.py.orig        2009-07-24
 
27
18:43:57.000000000 +0200
 
28
+++ Lib/idlelib/WidgetRedirector.py     2009-07-24
 
29
18:49:39.000000000 +0200
 
30
@@ -53,7 +53,10 @@
 
31
             if m:
 
32
                 return m(*args)
 
33
             else:
 
34
-                return self.tk.call((self.orig, cmd) + args)
 
35
+                result = self.tk.call((self.orig, cmd) + args)
 
36
+                if isinstance(result, tuple):
 
37
+                    result = '{%s}' % '} {'.join(map(str, result))
 
38
+                return result
 
39
         except TclError:
 
40
             return ""
 
41
 
 
42