sunzhenguo / pacparser

Automatically exported from code.google.com/p/pacparser
GNU Lesser General Public License v3.0
0 stars 0 forks source link

make fails on Centos 5.5 #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
when i try to build pacparser-1.2.9 on a centos server, i've got the following 
error:

[root@localhost pacparser-1.2.9]# make -C src pymod
make: entrant dans le répertoire « /root/tmp/pacparser-1.2.9/src »
cd pymod && ARCHFLAGS="" python setup.py build
running build
running build_py
running build_ext
python ../tests/runtests.py
Traceback (most recent call last):
  File "../tests/runtests.py", line 80, in ?
    main()
  File "../tests/runtests.py", line 77, in main
    runtests(pacfile, testdata, tests_dir)
  File "../tests/runtests.py", line 46, in runtests
    import pacparser
  File "/root/tmp/pacparser-1.2.9/src/../tests/../src/pymod/build/lib.linux-x86_64-2.4/pacparser/__init__.py", line 57
    except IOError as e:
                    ^
SyntaxError: invalid syntax
make: *** [pymod] Erreur 1
make: quittant le répertoire « /root/tmp/pacparser-1.2.9/src » 

So i have to modify this code in the 
/src/pymod/build/lib.linux-x86_64-2.4/pacparser/__init__.py file :

     54   try:
     55     f = open(pacfile)
     56     pac_script = f.read()
     57   except IOError as e:
     58     print('Could not read the pacfile: %s\n%s' % (pacfile, e))
     59     return
     60   f.close()
By:
     54   
     55   f = open(pacfile)
     56   pac_script = f.read()
     57   f.close()

Regards

Original issue reported on code.google.com by oeufd...@gmail.com on 6 Aug 2011 at 7:17

GoogleCodeExporter commented 9 years ago
Verified that this issues exists for all python versions < 2.6. 

Original comment by manugarg on 2 Sep 2011 at 9:48

GoogleCodeExporter commented 9 years ago

Original comment by manugarg on 2 Sep 2011 at 10:38

GoogleCodeExporter commented 9 years ago

Original comment by manugarg on 3 Sep 2011 at 8:48

GoogleCodeExporter commented 9 years ago
Fix submitted in the development branch:

http://code.google.com/r/manugarg-pacparser-dev/source/detail?r=9067b21b67ef0562
30381cc507097523890cc7ee

Original comment by manugarg on 5 Sep 2011 at 1:44

GoogleCodeExporter commented 9 years ago
New release 1.3.0 has a fix for this issue.

Original comment by manugarg on 10 Sep 2011 at 8:02