1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
From 4c3fe03b571d4740957ec4115992be75019ddc76 Mon Sep 17 00:00:00 2001
From: "Karol M. Langner" <langner@users.noreply.github.com>
Date: Sat, 10 Dec 2016 22:03:43 -0800
Subject: [PATCH] Avoid IndexError for plugins with empty names
---
scripts/python/pybel.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/python/pybel.py b/scripts/python/pybel.py
index f9aaec280..de85df712 100644
--- a/scripts/python/pybel.py
+++ b/scripts/python/pybel.py
@@ -81,7 +81,7 @@ def _getpluginnames(ptype):
ob.OBPlugin.ListAsVector(ptype, None, plugins)
if sys.platform[:4] == "java":
plugins = [plugins.get(i) for i in range(plugins.size())]
- return [x.split()[0] for x in plugins]
+ return [x.split()[0] for x in plugins if x.strip()]
_obconv = ob.OBConversion()
_builder = ob.OBBuilder()
|