sprhawk / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Fix pmImgCreator for Python 2.5 #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using Python 2.5
2. make check

What is the expected output? What do you see instead?
Expect tests to pass.  Instead t256 fails:
../../tools/pmImgCreator.py -c -u -o t256_img.c --native-file=t256_nat.c 
t256.py 
Traceback (most recent call last):
  File "../../tools/pmImgCreator.py", line 935, in <module>
    main()
  File "../../tools/pmImgCreator.py", line 929, in main
    pic.convert_files()
  File "../../tools/pmImgCreator.py", line 319, in convert_files
    imgs["imgs"].append(self.co_to_str(co))
  File "../../tools/pmImgCreator.py", line 463, in co_to_str
    s = self._seq_to_str(consts)
  File "../../tools/pmImgCreator.py", line 407, in _seq_to_str
    imgstr += self.co_to_str(obj)
  File "../../tools/pmImgCreator.py", line 473, in co_to_str
    l[i] = co.co_varnames.index(name)
AttributeError: 'tuple' object has no attribute 'index'
make[1]: *** [t256*_img.c] Error 1
make: *** [check] Error 2

Original issue reported on code.google.com by dwhall...@gmail.com on 3 Feb 2010 at 11:08

GoogleCodeExporter commented 9 years ago
tuple.index() is an API introduced in Python 2.6.  The fix is to turn the tuple 
into a 
list and continue to use index().  t256 serves as the regression for this.

Original comment by dwhall...@gmail.com on 3 Feb 2010 at 11:11

GoogleCodeExporter commented 9 years ago
System tests pass.  Mainlined directly, see r421.

Original comment by dwhall...@gmail.com on 3 Feb 2010 at 11:12

GoogleCodeExporter commented 9 years ago
Changing Milestone-r10 to Milestone-r09

Original comment by dwhall...@gmail.com on 7 Mar 2010 at 6:26

GoogleCodeExporter commented 9 years ago
Changed r09 to R09

Original comment by dwhall...@gmail.com on 12 Mar 2010 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 13 Mar 2010 at 1:30