mirror of
https://github.com/ansible/ansible
synced 2026-06-19 07:35:52 +00:00
Fix hacking/test-module to allow running modules with pdb (#23339)
* Fix hacking/test-module to allow running modules with pdb
* add emacs autosave files to gitignore
(cherry picked from commit 56d33a2967)
This commit is contained in:
committed by
Toshio Kuratomi
parent
c7052b42c7
commit
a8afa6b96c
+2
-1
@@ -2,9 +2,10 @@
|
||||
*.py[co]
|
||||
build
|
||||
AUTHORS.TXT
|
||||
# Emacs backup files...
|
||||
# Emacs backup and autosave files...
|
||||
*~
|
||||
.\#*
|
||||
\#*
|
||||
# RPM stuff...
|
||||
MANIFEST
|
||||
dist
|
||||
|
||||
+3
-3
@@ -228,11 +228,11 @@ def runtest(modfile, argspath, modname, module_style, interpreters):
|
||||
print(jsonify(results,format=True))
|
||||
|
||||
|
||||
def rundebug(debugger, modfile, argspath, modname, module_style):
|
||||
def rundebug(debugger, modfile, argspath, modname, module_style, interpreters):
|
||||
"""Run interactively with console debugger."""
|
||||
|
||||
if module_style == 'ansiballz':
|
||||
modfile, argspath = ansiballz_setup(modfile, modname)
|
||||
modfile, argspath = ansiballz_setup(modfile, modname, interpreters)
|
||||
|
||||
if argspath is not None:
|
||||
subprocess.call("%s %s %s" % (debugger, modfile, argspath), shell=True)
|
||||
@@ -257,7 +257,7 @@ def main():
|
||||
|
||||
if options.execute:
|
||||
if options.debugger:
|
||||
rundebug(options.debugger, modfile, argspath, modname, module_style)
|
||||
rundebug(options.debugger, modfile, argspath, modname, module_style, interpreters)
|
||||
else:
|
||||
runtest(modfile, argspath, modname, module_style, interpreters)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user