Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backend.py doesn't compile with Python 2.4.3 #12

Closed
haydnhuntley opened this issue Aug 30, 2011 · 3 comments
Closed

backend.py doesn't compile with Python 2.4.3 #12

haydnhuntley opened this issue Aug 30, 2011 · 3 comments

Comments

@haydnhuntley
Copy link

byte-compiling build/bdist.linux-x86_64/egg/tracadvsearch/backend.py to backend.pyc
File "build/bdist.linux-x86_64/egg/tracadvsearch/backend.py", line 80
q_string = " AND ".join(q_parts) if q_parts else ':'

I tried rewriting that line of code as:

    if q_parts:
        q_string = " AND ".join(q_parts)
    else:
        q_string = '*:*'

But now it fails to compile on the next line:

byte-compiling build/bdist.linux-x86_64/egg/tracadvsearch/backend.py to backend.pyc
File "build/bdist.linux-x86_64/egg/tracadvsearch/backend.py", line 85
try:
^

Does this code require a newer version of Python to work?

@dnephin
Copy link
Owner

dnephin commented Aug 30, 2011

Yes, this plugin was written for Python 2.5+

@haydnhuntley
Copy link
Author

Thank you for replying.
I tried to update the "X if bool else Y" statements, but that wasn't
enough to make it compile.
We'll update to a newer version of Python soon, and then we'll be able
to use your plugin.

--Haydn

dnephin wrote:

Yes, this plugin was written for Python 2.5+

Haydn Huntley office: 808-573-9522
haydn.huntley@gmail.com home: 808-575-2571
cell: 808-283-5173

@ChauChicken
Copy link
Contributor

Generated pull request #13

@dnephin dnephin closed this as completed Jul 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants