Browse code

Add argparse for RHEL6

python2.6 doesn't have argparse, required by outfilter.py. This
package is a dependency on cloud-init, so this problem is often masked
in many testing environments.

Change-Id: Ia564f1b8a7b540faa7bbdbd1a1a290c591901682

Ian Wienand authored on 2014/07/17 13:50:29
Showing 1 changed files
... ...
@@ -530,6 +530,12 @@ function echo_nolog {
530 530
     echo $@ >&3
531 531
 }
532 532
 
533
+if [[ is_fedora && $DISTRO =~ (rhel) ]]; then
534
+    # poor old python2.6 doesn't have argparse by default, which
535
+    # outfilter.py uses
536
+    is_package_installed python-argparse || install_package python-argparse
537
+fi
538
+
533 539
 # Set up logging for ``stack.sh``
534 540
 # Set ``LOGFILE`` to turn on logging
535 541
 # Append '.xxxxxxxx' to the given name to maintain history