Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Python 2.4 support #13

Open
alexjd2008 opened this issue Mar 25, 2014 · 3 comments
Open

Python 2.4 support #13

alexjd2008 opened this issue Mar 25, 2014 · 3 comments

Comments

@alexjd2008
Copy link

[root@centreon hipsaint-master]# python setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in ?
version = import('hipsaint').version
File "/root/hipsaint-master/hipsaint/init.py", line 16
parts = 2 if version[2] == 0 else 3
^
SyntaxError: invalid syntax

@hannseman
Copy link
Owner

Weird, what python version are you using?

@alexjd2008
Copy link
Author

[root@centreon hipsaint-master]# python
Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

@hannseman
Copy link
Owner

Yup that's it. The X if Z else Y syntax was introduced in python 2.5. I don't have an python 2.4 interpreter available at the moment but try and modify the parts = 2 if version[2] == 0 else 3 line to become a regular if-statement. If the tests pass after that please make a pull request.

@hannseman hannseman changed the title Do not install hipsaint Python 2.4 support May 6, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants