Skip to content

Commit

Permalink
Re #7143 moved algorithm and tweeked warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Jul 19, 2013
1 parent 6022033 commit 81300f0
Show file tree
Hide file tree
Showing 4 changed files with 536 additions and 455 deletions.
7 changes: 5 additions & 2 deletions Code/Mantid/Framework/PythonAPI/MantidFramework.py
Expand Up @@ -1999,7 +1999,7 @@ def suppressV1Warnings(filename, suppress=True):
except KeyError, exc:
pass

def warnOnV1MethodCall(frame=None):
def warnOnV1MethodCall(frame=None, identifier=None):
"""
Issue a Mantid log warning about the removal of v1 of the API when a method has
been called
Expand All @@ -2017,7 +2017,10 @@ def warnOnV1MethodCall(frame=None):
src = ""
if src_file:
src = " at line %d in '%s'" % (frame.f_lineno,src_file)
msg = "Warning: Python API v1 call has been made%s.\n" % (src)
msg = "Warning: Python API v1 call has been made %s" % (src)
if identifier is not None:
msg += "[%s]" % str(identifier)
msg += "\n"
print msg

#---------------------------------------------------------------------------------------
Expand Down

0 comments on commit 81300f0

Please sign in to comment.