@@ -57,7 +57,7 @@ def banner():
5757
5858def setup ():
5959 try :
60- subprocess .check_output (['cardano-node' ,'version' ]).decode (). split ()[ 1 ]
60+ subprocess .check_output (['cardano-node' ,'version' ]).decode ()
6161 except :
6262 print ('Cardano Node not installed.' )
6363 print ('Skipping setup...' )
@@ -108,18 +108,18 @@ def system():
108108def info ():
109109 try :
110110 node = subprocess .check_output (['cardano-node' ,'version' ]).decode ().split ()[1 ]
111- except : node = "Not found ."
111+ except : node = "Not installed ."
112112
113113 print (colored ("\n -------System Info---------" , "magenta" ))
114114
115115 print ("Distro: " + distro .id ()+ ' ' + distro .version ())
116116 print ("RAM Size: " + str (psutil .virtual_memory ()[0 ]/ 1024 / 1024 // 1024 )+ ' GB' )
117117 print ("Disk Size: " + str (psutil .disk_usage ('/' )[0 ]/ 1024 / 1024 // 1024 )+ 'GB' + '\n ' )
118- print ("Cardano-Node: " + node )
118+ print ("Cardano-Node: " + node )
119119 latest = requests .get (
120120 "https://api.github.com/repos/input-output-hk/cardano-node/releases/latest"
121121 ).json ()["tag_name" ]
122- if latest <= node :
122+ if latest <= node and node != "Not installed." :
123123 print (colored ("Cardano-Node is up to date" , "green" ))
124124 else :
125125 print (colored (f"Cardano-Node { latest } update available " , "red" ))
@@ -232,7 +232,7 @@ def installer():
232232 print (colored ("No existing version found..." , "yellow" ))
233233 print (colored ("Downloading Cardano-node..." , "yellow" ))
234234 download = subprocess .Popen (
235- "wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-linux/latest-finished/download --output-document latest-node.tar.xf" ,
235+ "sudo wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-linux/latest-finished/download --output-document latest-node.tar.xf" ,
236236 shell = True ,
237237 cwd = path
238238 )
0 commit comments