Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def upgrade_summary(data = None):
- """Returns a summary of a possible upgrade"""
- print "Generating summary"
- lp_Out = subprocess.PIPE
- slapt_call = subprocess.Popen('/usr/sbin/slapt-get --upgrade -s',
- bufsize=0, executable=None, stdin=None, \
- stdout=lp_Out, stderr=None, preexec_fn=None, \
- close_fds=False, shell=True, cwd=None, \
- env=None, universal_newlines=False, \
- startupinfo=None, creationflags=0)
- print "Waiting for slapt-get --upgrade -s"
- while slapt_call.poll() == None:
- if data:
- do_pulse_bar(data)
- yield True
- print "Done\nReading output"
- for package in slapt_call.stdout.readlines():
- if data:
- do_pulse_bar(data)
- #here you should process i and yield exactly what you
- #need. I will yield every line complete
- yield package
- print "Done"
Add Comment
Please, Sign In to add comment