From cb60923e2d62dc402374a77a19e19b2610f9613a Mon Sep 17 00:00:00 2001 From: Diego Stamigni Date: Wed, 2 Jan 2013 12:50:16 +0100 Subject: [PATCH 1/2] bugfix in else statement --- raspiwrite.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/raspiwrite.py b/raspiwrite.py index 054f93a..51b83f9 100755 --- a/raspiwrite.py +++ b/raspiwrite.py @@ -174,7 +174,7 @@ def run ( self ): global path if OS[0] != 'Darwin': copyString = 'dd bs=1M if=%s of=%s' % (path,SDsnip) - else + else: copyString = 'dd bs=1m if=%s of=%s' % (path,SDsnip) print 'Running ' + copyString + '...' @@ -272,10 +272,10 @@ def transfer(file,archiveType,obtain,SD,URL): #unzips the disk image SDsnip = "/dev/mmcblk" + SD[11] else: if OS[0] != 'Darwin': - SDsnip = SD.replace(' ', '')[:-1] + SDsnip = SD.replace(' ', '')[:-1] else: # remove weird partition notation in OS X partition names - SDsnip = SD.replace(' ', '')[:-2] + SDsnip = SD.replace(' ', '')[:-2] print path print '\n\n###################################################################' From cb761c01a5464e7392dc7f81f12a6792bfd84783 Mon Sep 17 00:00:00 2001 From: Diego Stamigni Date: Fri, 18 Jan 2013 19:14:21 +0100 Subject: [PATCH 2/2] fix for checkforUpdate() function -- host http://www.exaviorn.com/raspiwrite.xml is down --- raspiwrite.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/raspiwrite.py b/raspiwrite.py index 51b83f9..1f9e3c5 100755 --- a/raspiwrite.py +++ b/raspiwrite.py @@ -75,8 +75,7 @@ def checkforUpdate(): print WARNING + '#####################################################################################################################' print 'Your current version (%s) of RasPiWrite is not the latest, please go to the link below to update to version %s,' % (version, versionToDate) print 'The Changes include: %s' % summary - print ''' -Please download the latest version of RasPiWrite from %s''' % dlURL + print ''' Please download the latest version of RasPiWrite from %s''' % dlURL print '''##################################################################################################################### ''' + end else: @@ -437,7 +436,7 @@ def driveTest(SD): if not os.geteuid()==0: print WARNING + 'Please run the script using sudo e.g. sudo python raspiwrite.py, or sudo ./raspiwrite.py (need to chmod +x first)' + end exit() -checkforUpdate() +#checkforUpdate() print 'The following script is designed to copy a Raspberry Pi compatible disk image to an SD Card' print boldStart + 'INCORRECTLY FOLLOWING THE WIZARD COULD RESULT IN THE CORRUPTION OF YOUR HARD DISK, PARTITIONS OR A BACKUP USB DRIVE (INCLUDING MOUNTED TIME MACHINE BACKUP DRIVES)' +end print 'It is advisable to remove any other USB HDDs or memory sticks, the wizard might select that one, %s if you have multiple hard drives installed, please take a LOT of care selecting the right drive %s'% (boldStart, end)