centrofermi / e3pipe

Analysis pipeline for the EEE expriment
http://eee.centrofermi.it/
GNU General Public License v3.0
4 stars 1 forks source link

Tweak the exception handing in __utils__.py #81

Open lucabaldini opened 9 years ago

lucabaldini commented 9 years ago

It seems like it would not be hard to be more backward compatible with old versions of python:

Ciao Luca, la mia versione di Python è la 2.4.3

Il tuo suggerimento sembra aver risolto quel problema.

Ho dovuto installare anche mysql e dumpy.

Adesso faccio un po di debug su REGG-01. Grazie

Francesco

Il 26/02/2015 17.16, Luca Baldini ha scritto:

Che versione di python hai?

Puoi provare a fare un query replace di

except Exception as e:

in

except Exception, e:

?

Se funziona lo provo al CNAF, committo e taggo.

Luca

On 02/26/2015 05:07 PM, noferini wrote:

Ciao Luca, sto lavorando su un mio pc e ho il seguente messaggio. Ho una versione obsoleta du python? Francesco

[noferini@boalicetof apps]$ ./e3dst.py REGG-01-2015-02-25-00002.out

Welcome to e3pipe version 2.0.1 (built on Wed, 25 Feb 2015 18:56:52 +0100).

Copyright (C) 2014--2015 Luca Baldini (luca.baldini@pi.infn.it)

e3pipe comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain
conditions. See the LICENSE file for details.

Visit https://github.com/centrofermi/e3pipe more information.

Traceback (most recent call last): File "./e3dst.py", line 42, in ? import e3pipe.utils File "/alistorage/noferini/e3pipe/utils.py", line 88 except Exception as e: ^ SyntaxError: invalid syntax

lucabaldini commented 9 years ago

It seems this change will be incompatible with python 3, see http://stackoverflow.com/questions/5119751/in-python-whats-the-difference-between-except-exception-as-e-and-except-exc and https://www.python.org/dev/peps/pep-3110/

We should think on whether backward compatibility with 2.4 is more important than forward compatibility with 3.