[gnoduino] print proper output when uploading
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino] print proper output when uploading
- Date: Fri, 6 Apr 2012 20:21:57 +0000 (UTC)
commit 103f6a33a9b84b133b89a9b9f70c196cb577d1fd
Author: Lucian Langa <lucilanga gnome org>
Date: Fri Apr 6 21:57:52 2012 +0200
print proper output when uploading
src/uploader.py | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/src/uploader.py b/src/uploader.py
index 1471c2f..1cd523e 100644
--- a/src/uploader.py
+++ b/src/uploader.py
@@ -80,13 +80,14 @@ def burnBootloader(serial, output, notify, id):
compline.append("-Uefuse:w:" + b.getFuseExtended(b.getBoard()) + ":m")
compline.append("-Uhfuse:w:" + b.getFuseHigh(b.getBoard()) + ":m")
compline.append("-Ulfuse:w:" + b.getFuseLow(b.getBoard()) + ":m")
- misc.printMessageLn(output, ' '.join(compline))
try:
+ if p.getBoolValue("build.verbose"):
+ sys.stderr.write(' '.join(compline)+"\n")
+ misc.printMessageLn(output, ' '.join(compline))
(run, sout) = misc.runProg(compline)
- if run == False:
- if p.getBoolValue("build.verbose"):
- misc.printErrorLn(notify, output, _("Burn Error"), sout)
- raise
+ misc.printMessageLn(output, sout, p.getBoolValue("build.verbose"), 'false')
+ if p.getBoolValue("build.verbose"): sys.stderr.write(sout+"\n")
+ if run == False: raise
except:
misc.printErrorLn(notify, output, _("Burn Error"), _("Burn ERROR."))
return
@@ -110,13 +111,14 @@ def burnBootloader(serial, output, notify, id):
compline.append("-F")
compline.append("-Uflash:w:" + findBootLoader() + ":i")
compline.append("-Ulock:w:" + b.getFuseLock(b.getBoard()) + ":m")
- misc.printMessageLn(output, ' '.join(compline))
try:
+ if p.getBoolValue("build.verbose"):
+ sys.stderr.write(' '.join(compline)+"\n")
+ misc.printMessageLn(output, ' '.join(compline))
(run, sout) = misc.runProg(compline)
- if run == False:
- if p.getBoolValue("build.verbose"):
- misc.printErrorLn(notify, output, _("Burn Error"), sout)
- raise
+ misc.printMessageLn(output, sout, p.getBoolValue("build.verbose"), 'false')
+ if p.getBoolValue("build.verbose"): sys.stderr.write(sout+"\n")
+ if run == False: raise
except:
misc.printErrorLn(notify, output, _("Burn Error"), _("Burn ERROR."))
return
@@ -173,6 +175,7 @@ def upload(obj, serial, output, notify):
misc.printMessageLn(output, ' '.join(compline))
(run, sout) = misc.runProg(compline)
misc.printMessageLn(output, sout, p.getBoolValue("build.verbose"), 'false')
+ if p.getBoolValue("build.verbose"): sys.stderr.write(sout+"\n")
if run == False: raise
except:
misc.printErrorLn(notify, output, _("Flashing Error"), _("Flash ERROR.\n"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]