From db5166d1736def67b390a84ede55e3872358c540 Mon Sep 17 00:00:00 2001 From: bobson38 Date: Sun, 16 Dec 2012 18:11:08 +0100 Subject: [PATCH] Update raspiwrite.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I got the following errors: - File "./raspiwrite.py", line 177     else        ^   SyntaxError: invalid syntax - File "./raspiwrite.py", line 275     SDsnip =  SD.replace(' ', '')[:-1]          ^   IndentationError: expected an indented block So i added the ":" after the else on line 177, corrected the indentation level on line 275 and 278. --- raspiwrite.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/raspiwrite.py b/raspiwrite.py index 054f93a..c33bf67 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###################################################################'