Merge pull request #1055 from ryanpetrello/lazybaron

only import the redbaron library on-demand
This commit is contained in:
Ryan Petrello
2018-01-25 13:09:58 -05:00
committed by GitHub

View File

@@ -6,9 +6,6 @@ import glob
import os
import shutil
# RedBaron
from redbaron import RedBaron, indent
# AWX
from awx.conf.registry import settings_registry
@@ -33,6 +30,8 @@ def comment_assignments(patterns, assignment_names, dry_run=True, backup_suffix=
def comment_assignments_in_file(filename, assignment_names, dry_run=True, backup_filename=None):
from redbaron import RedBaron, indent
if isinstance(assignment_names, basestring):
assignment_names = [assignment_names]
else: