@@ -284,7 +284,7 @@ def cleanup_script_files():
284284nodes_dict = dict ()
285285node_id_to_label_map = dict () # Helper to get clean node labels from GraphML ID
286286
287- for node in nodes_text :
287+ for node in nodes_text :
288288 try :
289289 data = node .find ('data' , recursive = False )
290290 if data :
@@ -306,16 +306,16 @@ def cleanup_script_files():
306306
307307 nodes_dict [node ['id' ]] = node_label
308308 node_id_to_label_map [node ['id' ]] = node_label .split (':' )[0 ]
309- except (IndexError , AttributeError ):
310- logging .debug ('A node with no valid properties encountered and ignored' )
311-
312- label_values = list (nodes_dict .values ())
313- duplicates = {label for label in label_values if label_values .count (label ) > 1 }
314- if duplicates :
315- logging .error (f"Duplicate node labels found: { sorted (duplicates )} " )
316- quit ()
317-
318- for edge in edges_text :
309+ except (IndexError , AttributeError ):
310+ logging .debug ('A node with no valid properties encountered and ignored' )
311+
312+ label_values = list (nodes_dict .values ())
313+ duplicates = {label for label in label_values if label_values .count (label ) > 1 }
314+ if duplicates :
315+ logging .error (f"Duplicate node labels found: { sorted (duplicates )} " )
316+ quit ()
317+
318+ for edge in edges_text :
319319 try :
320320 data = edge .find ('data' , recursive = False )
321321 if data :
@@ -785,13 +785,13 @@ def cleanup_script_files():
785785 fcopy .write ('CMD ["./a.out"]\n ' ) # 7/02/21
786786
787787 fbuild .write ('#!/bin/bash' + "\n " )
788- for node in nodes_dict :
789- containername ,sourcecode = nodes_dict [node ].split (':' )
790- if len (sourcecode )!= 0 and sourcecode .find ("." )!= - 1 : #3/28/21
791- dockername ,langext = sourcecode .rsplit ("." , 1 )
792- dockerbuilddir = "docker-" + dockername .replace ("/" , "__" ).replace ("\\ " , "__" )
793- fbuild .write ("mkdir " + dockerbuilddir + "\n " )
794- fbuild .write ("cd " + dockerbuilddir + "\n " )
788+ for node in nodes_dict :
789+ containername ,sourcecode = nodes_dict [node ].split (':' )
790+ if len (sourcecode )!= 0 and sourcecode .find ("." )!= - 1 : #3/28/21
791+ dockername ,langext = sourcecode .rsplit ("." , 1 )
792+ dockerbuilddir = "docker-" + dockername .replace ("/" , "__" ).replace ("\\ " , "__" )
793+ fbuild .write ("mkdir " + dockerbuilddir + "\n " )
794+ fbuild .write ("cd " + dockerbuilddir + "\n " )
795795 fbuild .write ("cp ../src/Dockerfile." + dockername + " Dockerfile\n " )
796796 #copy sourcefiles from ./src into corresponding directories
797797 fbuild .write ("cp ../src/" + sourcecode + " .\n " )
0 commit comments