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

SyntaxError: invalid syntax #6

Closed
johntdyer opened this issue Dec 28, 2010 · 7 comments
Closed

SyntaxError: invalid syntax #6

johntdyer opened this issue Dec 28, 2010 · 7 comments

Comments

@johntdyer
Copy link

I get this when I try to use vcprompt

[code]
File "/usr/bin/vcprompt", line 284
with open(file, 'r') as f:
^
SyntaxError: invalid syntax
[/code]

@djl
Copy link
Owner

djl commented Dec 28, 2010

Looks like you're running a pretty old Python version. I'm guessing <= 2.4.

Is that right?

@johntdyer
Copy link
Author

Yep:

Python 2.4.3 (#1, Jul 27 2009, 17:56:30)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

@djl
Copy link
Owner

djl commented Dec 28, 2010

Ah, RHEL. I knew it :)

I'd rather not have to support 2.4.x as even the RHEL devs have moved to 2.6 now. But knowing how long it takes for users to upgrade I may as well do this.

Meh, I'll see if I can get to it but I'll have to dig up an old machine with Python 2.4 first.

@johntdyer
Copy link
Author

Well its Centos 5, and its our base img in our NOC... a fix would be ideal, thanks

@djl
Copy link
Owner

djl commented Dec 28, 2010

Damn. I forgot about CentOS.

Anyway, I've already made a start on this but have noticed some hairy issues with the tests. I'll fix those first before making a start on Python 2.4 support.

@djl
Copy link
Owner

djl commented Dec 29, 2010

Alright, I think I've got it working in dba0d83. It's not fully tested and is still very experimental.

Test it out and let me know if I broke anything.

@johntdyer
Copy link
Author

Looks good! Thanks!

John

This issue was closed.
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