Browse Source

[oozie] Installing oozie examples gives error

Change-Id: Ib737b6df40dce99ac8e62e1600a1fe7bc61e9e9c
(cherry picked from commit f7753455422dfd9da6212ea92d155072b0c544e8)
(cherry picked from commit fa9013a1cb6b96b47c26c53cc7b9b184ccf24468)
Prakash Ranade 3 years ago
parent
commit
59c7f9388a
1 changed files with 4 additions and 1 deletions
  1. 4 1
      apps/oozie/src/oozie/management/commands/oozie_setup.py

+ 4 - 1
apps/oozie/src/oozie/management/commands/oozie_setup.py

@@ -369,7 +369,10 @@ class Command(BaseCommand):
 
     if ENABLE_V2.get():
       with transaction.atomic():
-        management.call_command('loaddata', 'initial_oozie_examples.json', verbosity=2, commit=False)
+        if sys.version_info[0] > 2:
+          management.call_command('loaddata', 'initial_oozie_examples.json', verbosity=2)
+        else:
+          management.call_command('loaddata', 'initial_oozie_examples.json', verbosity=2, commit=False)
 
     # Install editor oozie examples without doc1 link
     LOG.info("Using Hue 4, will install oozie editor samples.")