Salome HOME
bos #29469: Advanced geometry features: Detect type of shape
[modules/geom.git] / src / GEOM_SWIG / STEPPluginBuilder.py
index 84ac4cf0ca653f9c6894ce68532e9caf82fd1723..b6765dde99343e984180f4ceec7aee44a7b5b167 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2014-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2014-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -25,7 +25,7 @@ import GEOM
 __libraryName__ = "STEPPluginEngine"
 
 def GetSTEPPluginOperations(self):
-    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    anOp = self.GetPluginOperations(__libraryName__)
     return anOp._narrow(ISTEPOperations)
 
 ## Export the given shape into a file with given name in STEP format.
@@ -45,7 +45,7 @@ def ExportSTEP(self, theObject, theFileName, theUnit=GEOM.LU_METER):
     anOp = GetSTEPPluginOperations(self)
     anOp.ExportSTEP(theObject, theFileName, theUnit)
     if anOp.IsDone() == 0:
-        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        raise RuntimeError("Export : " + anOp.GetErrorCode())
         pass
     pass
 
@@ -103,11 +103,11 @@ def ImportSTEP(self, theFileName, theIsIgnoreUnits = False,
     anIsIgnoreUnits = theIsIgnoreUnits
     anIsCreateAssemblies = IsCreateAssemblies;
     aName = theName
-    if isinstance( theIsIgnoreUnits, basestring ):
+    if isinstance( theIsIgnoreUnits, str ):
         anIsIgnoreUnits = False
         aName = theIsIgnoreUnits
         pass
-    elif isinstance( IsCreateAssemblies, basestring ):
+    elif isinstance( IsCreateAssemblies, str ):
         anIsCreateAssemblies = False
         aName = IsCreateAssemblies
         pass