From 2b304eb70b167189b6b7e0619c358aa6d03138f7 Mon Sep 17 00:00:00 2001 From: mzn Date: Wed, 5 Nov 2014 12:53:02 +0000 Subject: [PATCH] Bug #486: SyntaxError: can't assign to operator after dump python. --- src/HYDROData/HYDROData_Entity.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/HYDROData/HYDROData_Entity.cxx b/src/HYDROData/HYDROData_Entity.cxx index 30c2aa94..ba2cb941 100644 --- a/src/HYDROData/HYDROData_Entity.cxx +++ b/src/HYDROData/HYDROData_Entity.cxx @@ -46,7 +46,10 @@ QString HYDROData_Entity::GetName() const QString HYDROData_Entity::GetObjPyName() const { - return GetName().replace(" ", "_"); + QString aName = GetName(); + aName.replace(QRegExp("[\\W]"), "_"); + + return aName; } void HYDROData_Entity::SetName(const QString& theName) -- 2.39.2