Codebase list xapp / debian/1.2.0-1 files / usr / bin / upload-system-info

Tree @debian/1.2.0-1 (Download .tar.gz)

upload-system-info @debian/1.2.0-1raw · history · blame


import subprocess, os

    inxi = subprocess.Popen(['inxi', '-Fxxrzc0'], stdout=subprocess.PIPE)
    pastebin = subprocess.Popen(['/usr/bin/pastebin'], stdin=inxi.stdout, stdout=subprocess.PIPE)
    output = pastebin.communicate()[0]
    output = output.split()[0] # if we have more than one URL, only use the first one
    pastebin.wait()['xdg-open', output])
except Exception as e:
    print ("An error occurred while uploading the system information:")
    print (e)
    print ("Please make sure you're connected to the Internet.")