Blame SOURCES/bz1568753-4-fence_gce-bundled-libs.patch

554a6e
diff -uNr a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py
554a6e
--- a/agents/gce/fence_gce.py	2018-07-12 09:54:53.121993715 +0200
554a6e
+++ b/agents/gce/fence_gce.py	2018-07-12 09:57:42.580699588 +0200
554a6e
@@ -15,9 +15,14 @@
554a6e
   import urllib2 as urlrequest
554a6e
 sys.path.append("@FENCEAGENTSLIBDIR@")
554a6e
 
554a6e
-import googleapiclient.discovery
554a6e
 from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action
554a6e
 
554a6e
+try:
554a6e
+	sys.path.insert(0, '/usr/lib/fence-agents/bundled/gce')
554a6e
+	import googleapiclient.discovery
554a6e
+except ImportError:
554a6e
+        pass
554a6e
+
554a6e
 
554a6e
 METADATA_SERVER = 'http://metadata.google.internal/computeMetadata/v1/'
554a6e
 METADATA_HEADERS = {'Metadata-Flavor': 'Google'}