~ubuntu-branches/ubuntu/raring/pexpect/raring

« back to all changes in this revision

Viewing changes to debian/patches/20_fix_chess_example.patch

  • Committer: Package Import Robot
  • Author(s): Arthur de Jong, Arthur de Jong, Piotr Ożarowski, Sandro Tosi, Carlos Galisteo
  • Date: 2012-03-09 11:43:41 UTC
  • mfrom: (1.1.3)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20120309114341-1qlflcb1suvoiwna
* Team upload.

[ Arthur de Jong ]
* New upstream release (Closes: #609195).
* Switch to 3.0 (quilt) source format.
* Switch to dh-style debian/rules.
* Moved packaging from python-central to dh_python2 (Closes: #616935,
  LP: #788514).
* Drop Conflicts/Replaces on ancient versions which shipped in sarge.
* Bump standards-version to 3.9.3.
* Register documentation with doc-base.
* Update debian/copyright (license is actually MIT instead of Python 2.3).
* Fix syntax errors in one of the examples (closes: #580271)

[ Piotr Ożarowski ]
* Added Vcs-Svn and Vcs-Browser fields

[ Sandro Tosi ]
* debian/control
  - uniforming Vcs-Browser field
* debian/control
  - switch Vcs-Browser field to viewsvn

[ Carlos Galisteo ]
* debian/control
  - Added Homepage field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fix syntax errors in example files.
 
2
Bug-Debian: http://bugs.debian.org/580271
 
3
Author: Arthur de Jong <adejong@debian.org>
 
4
 
 
5
--- a/examples/chess.py
 
6
+++ b/examples/chess.py
 
7
@@ -23,7 +23,7 @@
 
8
                 self.term.process_list (self.before)
 
9
                 self.term.process_list (self.after)
 
10
                self.last_computer_move = ''
 
11
-        def read_until_cursor (self, r,c)
 
12
+        def read_until_cursor (self, r,c):
 
13
             while 1:
 
14
                 self.child.read(1, 60)
 
15
                 self.term.process (c)
 
16
@@ -41,7 +41,7 @@
 
17
                 read_until_cursor (19,60)
 
18
                #self.child.expect ('\[19;60H')
 
19
                self.child.sendline (move)
 
20
-               print 'do_move' move
 
21
+               print 'do_move', move
 
22
                return move
 
23
 
 
24
        def get_first_computer_move (self):
 
25
--- a/examples/fix_cvs_files.py
 
26
+++ b/examples/fix_cvs_files.py
 
27
@@ -24,8 +24,8 @@
 
28
 
 
29
 def is_binary (filename):
 
30
 
 
31
-    """Assume that any file with a character where the 8th bit is set is
 
32
-    binary. """
 
33
+       """Assume that any file with a character where the 8th bit is set is
 
34
+       binary. """
 
35
 
 
36
        fin = open(filename, 'rb')
 
37
        wholething = fin.read()
 
38
@@ -37,9 +37,9 @@
 
39
 
 
40
 def is_kb_sticky (filename):
 
41
 
 
42
-    """This checks if 'cvs status' reports '-kb' for Sticky options. If the
 
43
-    Sticky Option status is '-ks' then this returns 1. If the status is
 
44
-    'Unknown' then it returns 1. Otherwise 0 is returned. """
 
45
+       """This checks if 'cvs status' reports '-kb' for Sticky options. If the
 
46
+       Sticky Option status is '-ks' then this returns 1. If the status is
 
47
+       'Unknown' then it returns 1. Otherwise 0 is returned. """
 
48
 
 
49
        try:
 
50
                s = pexpect.spawn ('cvs status %s' % filename)
 
51
@@ -59,7 +59,7 @@
 
52
 
 
53
 def cvs_admin_kb (filename):
 
54
 
 
55
-    """This uses 'cvs admin' to set the '-kb' sticky option. """
 
56
+       """This uses 'cvs admin' to set the '-kb' sticky option. """
 
57
 
 
58
        s = pexpect.run ('cvs admin -kb %s' % filename)
 
59
        # There is a timing issue. If I run 'cvs admin' too quickly
 
60
@@ -68,8 +68,8 @@
 
61
        
 
62
 def walk_and_clean_cvs_binaries (arg, dirname, names):
 
63
 
 
64
-    """This contains the logic for processing files. This is the os.path.walk
 
65
-    callback. This skips dirnames that end in CVS. """
 
66
+       """This contains the logic for processing files. This is the os.path.walk
 
67
+       callback. This skips dirnames that end in CVS. """
 
68
 
 
69
        if len(dirname)>3 and dirname[-3:]=='CVS':
 
70
                return
 
71
--- a/examples/ssh_tunnel.py
 
72
+++ b/examples/ssh_tunnel.py
 
73
@@ -56,7 +56,7 @@
 
74
             print 'restarting tunnel'
 
75
             start_tunnel ()
 
76
             time.sleep (11)
 
77
-               print 'tunnel OK'
 
78
+            print 'tunnel OK'
 
79
         else:
 
80
             # print 'tunnel OK'
 
81
             time.sleep (7)