CondaInterface/__init__.py

branch
conda
changeset 6738
a7f835b41606
parent 6724
ca89c7d94c94
child 6741
33a82a20dd3a
--- a/CondaInterface/__init__.py	Wed Feb 13 19:03:29 2019 +0100
+++ b/CondaInterface/__init__.py	Wed Feb 13 19:48:48 2019 +0100
@@ -63,7 +63,10 @@
                 int(i) for i in __CondaVersionStr.split(".")
             )
             __CondaRootPrefix = jsonDict["root_prefix"]
-            __CondaUserConfig = jsonDict["rc_path"]
+            if "user_rc_path" in jsonDict:
+                __CondaUserConfig = jsonDict["user_rc_path"]
+            elif "rc_path" in jsonDict:
+                __CondaUserConfig = jsonDict["rc_path"]
             
             __initialized = True
 
@@ -112,6 +115,16 @@
     return __CondaUserConfig
 
 
+def isCondaAvailable():
+    """
+    Module function to check the availability of conda.
+    
+    @return flag indicating conda availability
+    @rtype bool
+    """
+    __initializeCondaInterface()
+    return bool(__CondaVersion)
+
 def resetInterface():
     """
     Module function to reset the conda interface.

eric ide

mercurial