Issue #10 open

Not compatible with python 2.6.4

Mathieu Clabaut
created an issue

Some structures like : IGNORE = open('NUL:','w') if subprocess.mswindows else open('/dev/null','w')

are not 2.4 compatible.

Is it possible to either make the extension compatible, or to disable it when the used version of python is 2.4 (case of several computers with common .hgrc but different python version) ?

Anyway, this is a great plug-in !

Comments (4)

  1. Steve Losh repo owner
    • changed status to open

    Everything runs fine for me on 2.6.4... even the {incoming} keyword (which uses the line you mentioned) works.

    What OS are you running? Can you post the actual traceback you're getting?

  2. lee

    Mathieu,

    You could, and I have, unroll the one line if statements to make it compatible with py2.4. Its not pretty, but it works for systems (like some of mine) where updating python is not an option.

    IGNORE = open('NUL:','w') if subprocess.mswindows else open('/dev/null','w')
    

    would become something more like

    if subprocess.mswindows:
      IGNORE = open('NUL:','w')
    else:
      IGNORE = open('/dev/null','w')
    
  3. Log in to comment