Commit c2476109 authored by dirk.wintergruen's avatar dirk.wintergruen
Browse files

error handling if not edge list can be generated

parent 40011e2c
......@@ -3,21 +3,9 @@ import igraph
import math
import matplotlib.patches as mpatches
from builtins import str
import matplotlib
import tempfile
import os
# from network_extensions.igraph_redis import ExtendedRedisGraph
# from network_extensions.ExtendedGraph import ExtendedGraph
# from network_extensions.ExtendedGraph import ExtendedGraph
# try: #TODO improve this handling
# matplotlib.use("MacOSX")
# from matplotlib import pylab
# except:
# matplotlib.use("ps")
# from matplotlib import pylab
import sys
import tarfile
import re
......@@ -95,9 +83,14 @@ def get_edgelist(g, attrs, v_attr):
attrL = [s, t] + [(v, getA(e, v, "")) for v in attrs]
ret.append(tuple(attrL))
try:
return set(ret)
if len(ret) > 0:
return set(ret)
else:
return set()
except:
print("ERROR")
logging.error(f"ERROR: couldn't create the edge List {sys.exc_info()}")
logging.error("Will return an empty set!")
return set()
def get_merged_edge_list(ml):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment