From 5a4950d5ebd54d22a70a8fdb1d5ca2b533172b8a Mon Sep 17 00:00:00 2001 From: Rob Moen Date: Thu, 27 Sep 2012 10:58:48 -0700 Subject: [PATCH] Fix syntax errors and cleanup whitespace. --- raspiwrite.py | 74 +++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/raspiwrite.py b/raspiwrite.py index 054f93a..3013f72 100755 --- a/raspiwrite.py +++ b/raspiwrite.py @@ -48,12 +48,14 @@ version = 1.15 -#Display Augs +# Display Augs boldStart = "\033[1m" end = "\033[0;0m" WARNING = '\033[0;31m' -OS = os.uname() #gets OS vars +# Gets OS vars +OS = os.uname() + def checkforUpdate(): print 'Checking for updates...' @@ -103,8 +105,8 @@ def getZipUrl(url): #gets all the urls that end in .zip or .tar.bz2 (only two di htmlSource = urllib2.urlopen(url).read() linksList = re.findall(' Debian - Login is pi/raspberry > Arch - Login is root/root @@ -315,10 +316,10 @@ def transfer(file,archiveType,obtain,SD,URL): #unzips the disk image > QtonPi - Login is root/rootme ########################################### Thank You for using RasPiWrite, you are now free to eject your drive - """ + """ else: print 'ENDING WITHOUT COPYING ANY DATA ACROSS, SD CARD HAS BEEN UNMOUNTED' - exit() + exit() 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 @@ -387,8 +388,7 @@ def getImage(SD): #gives the user a bunch of options to download an image, or se if matchBzip is not None: print 'found Bz2' transfer(userLocate, 'bz2', 'usr',SD,'none') - - + else: print 'sorry, the file you have specified doesn\'t exist, please try again' print 'Press ctrl + c (^C) to quit'