Skip to content

Commit

Permalink
Clean Up Comments and Leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
exaviorn committed Mar 24, 2012
1 parent d715a2e commit cad9154
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions raspiwrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,11 @@ def unmount(location): #unmounts the drive so that it can be rewrittern
print output
if 'Unmount failed for' in output:
print WARNING + 'Error, the Following drive couldn\'t be unmounted, exiting...' + end
# #exit() #<-- commented out for debugging purposes
exit() #<-- commented out for debugging purposes

class transferInBackground (threading.Thread): #Runs the dd command in a thread so that I can give a waiting... indicator

def run ( self ):
#output = getoutput('sleep 10 && echo hello!')
global SDsnip
global path
copyString = 'dd bs=1m if=%s of=%s' % (path,SDsnip)
Expand Down Expand Up @@ -177,9 +176,7 @@ def transfer(file,archiveType,obtain,SD,URL): #unzips the disk image
print '###################################################################\n'
confirm = raw_input(boldStart + 'Please verify this information before hitting typing \'accept\', if this information isn\'t correct, please press ctrl + c (^C), or type \'exit\' to quit: ' + end)
if confirm == 'accept':
#copyString = 'dd bs=1m if=%s of=%s' % (path, SD.replace(' ', '')[:-2])
thread1 = transferInBackground()
#transferInBackground.run(SD,path)
thread1.start()
sys.stdout.write("Waiting")
sys.stdout.flush()
Expand All @@ -203,7 +200,6 @@ def transfer(file,archiveType,obtain,SD,URL): #unzips the disk image
def getImage(SD): #gives the user a bunch of options to download an image, or select their own, it then passes the user on to the transfer function
global boldStart
global end
#print 'SD is:' + SD
userChoice = raw_input('Do you wish to Download a Raspberry Pi compatiable image (choose yes if you don\'t have one) (Y/n): ')
if (userChoice == 'Y') or (userChoice == 'y'):
print boldStart + """
Expand Down Expand Up @@ -267,15 +263,12 @@ def driveTest(SD):
#############################################################
""" + end
manualID = raw_input("Please enter the location you believe holds the SD Card: ")
#print manualID
driveTest(manualID)
else:
sdID = raw_input("I Believe this is your SD card: " + SD + " is that correct? (Y/n) ")
if (sdID == 'Y') or (sdID == 'y'): #continue
unmount(SD) #<--works, so don't need to test
#print 'SD is:' + SD
getImage(SD)
#print 'SD is:' + SD

if (sdID == 'N') or (sdID == 'n'):
manualID = raw_input("Please enter the location you believe holds the SD Card: ")
Expand Down

0 comments on commit cad9154

Please sign in to comment.