Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2013
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. #!/usr/bin/env python
  2. import os
  3. import time
  4. import subprocess
  5.  
  6. def Runit(cmd):
  7.         try:
  8.                 subprocess.check_output(cmd)
  9.                 return True
  10.         except:
  11.                 return False
  12. getcmd=["/usr/bin/phablet-dev-bootstrap","-c", "-v", "grouper", "/home/madmaze/n7"]
  13.  
  14. res = Runit(getcmd)
  15. print "finished prefetch"
  16. counter = 0
  17. while res is False and counter < 50:
  18.         res = Runit(getcmd)
  19.         print "being nice.. waiting 5sec"
  20.     time.sleep(5)
  21.         counter +=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement