fosslinux / live-bootstrap

Use of a Linux initramfs to fully automate the bootstrapping process
291 stars 26 forks source link

Exception constructing message for download error #402

Closed rick-masters closed 6 months ago

rick-masters commented 6 months ago

When a download receives an HTTP error code, there is an exception constructing the error message:

...
Bootstrapping x86                                                                                                                                       
Downloading: mes-0.25.tar.gz                                                                                                                            
Downloading: nyacc-1.00.2.tar.gz                                                                                                                        
Downloading: tcc-0.9.26.tar.gz                                                                                                                          
Downloading: tcc-0.9.27.tar.bz2                                                                                                                         
Traceback (most recent call last):                                                                                                                      
  File "./rootfs.py", line 280, in <module>                                                                                                             
    main()                                                                                                                                              
  File "./rootfs.py", line 183, in main                                                                                                                 
    bootstrap(args, generator, target, args.target_size)                                                                                                
  File "./rootfs.py", line 260, in bootstrap                                                                                                            
    generator.prepare(target, kernel_bootstrap=True, target_size=size)                                                                                  
  File "/home/ubuntu/lb-test-master-qemu-kb-1/lib/generator.py", line 93, in prepare                                                                    
    self.steps()                                                                                                                                        
  File "/home/ubuntu/lb-test-master-qemu-kb-1/lib/generator.py", line 113, in steps                                                                     
    self.get_packages()                                                                                                                                 
  File "/home/ubuntu/lb-test-master-qemu-kb-1/lib/generator.py", line 314, in get_packages                                                              
    path = self.download_file(line[2], line[1], line[3])                                                                                                
  File "/home/ubuntu/lb-test-master-qemu-kb-1/lib/generator.py", line 307, in download_file                                                             
    raise requests.HTTPError("Download failed: HTTP " +                                                                                                 
TypeError: can only concatenate str (not "int") to str