From: mzn Date: Wed, 5 Nov 2014 12:53:02 +0000 (+0000) Subject: Bug #486: SyntaxError: can't assign to operator after dump python. X-Git-Tag: BR_hydro_v_1_0_4~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2b304eb70b167189b6b7e0619c358aa6d03138f7;p=modules%2Fhydro.git Bug #486: SyntaxError: can't assign to operator after dump python. --- 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)