Allow the root file to be neithe ran edge nor a node file so long as a root file columns name was supplied.
@@ -179,9 +179,9 @@ def run(input_file: KGTKFiles,
rootcol = int(rootfilecolumn) if rootfilecolumn is not None and rootfilecolumn.isdigit() else root_kr.get_node1_column_index(rootfilecolumn)
elif root_kr.is_node_file:
rootcol = int(rootfilecolumn) if rootfilecolumn is not None and rootfilecolumn.isdigit() else root_kr.get_id_column_index(rootfilecolumn)
- else:
+ elif rootfilecolumn is None:
root_kr.close()
- raise KGTKException("The root file is neither an edge nor a node file.")
+ raise KGTKException("The root file is neither an edge nor a node file and the root column name was not supplied.")
if rootcol < 0:
root_kr.close()
