Skip to contentSkip to conversation

small fix for Python3 compatibility

PATCH New Frédéric Yhuel 2 participants 2 messages Feb 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 small fix for Python3 compatibility

running 2to3 on the other files of the 'python' directory shows other problems, but it seems that we only need this patch to get coccigrep working with Python3

---
 python/coccilib/xml_firehose.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
python/coccilib/xml_firehose.py +1 -1
index 72048c1..b60267a 100644
@@ -24,7 +24,7 @@ def import_firehose():
     try:
         globals()['firehose'] = __import__('firehose.model')
     except ImportError:
-        print "Error: Firehose is not installed or not in the Python path."
+        print("Error: Firehose is not installed or not in the Python path.")
 
 class Analysis(object):
     """
Signature · 1 line
1.9.0
#1 lore raw

PATCH 1/1 small fix for Python3 compatibility

Quoted 3 lines · Fr?d?ric Yhuel

running 2to3 on the other files of the 'python' directory shows other problems, but it seems that we only need this patch to get coccigrep working with Python3

Thanks. I have integrated the change.

julia

Quoted 25 lines
---
 python/coccilib/xml_firehose.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
python/coccilib/xml_firehose.py +1 -1
index 72048c1..b60267a 100644
@@ -24,7 +24,7 @@ def import_firehose():
     try:
         globals()['firehose'] = __import__('firehose.model')
     except ImportError:
-        print "Error: Firehose is not installed or not in the Python path."
+        print("Error: Firehose is not installed or not in the Python path.")
 
 class Analysis(object):
     """
Signature · 6 lines
1.9.0

_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci