[gnoduino] sanitize variant and includes functions
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino] sanitize variant and includes functions
- Date: Sat, 3 Mar 2012 21:37:23 +0000 (UTC)
commit d1ae053b2b12b18853670c97972628c4966e1928
Author: Lucian Langa <lucilanga gnome org>
Date: Sat Mar 3 20:09:49 2012 +0100
sanitize variant and includes functions
src/misc.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/misc.py b/src/misc.py
index cc41d8c..5f3bb3e 100644
--- a/src/misc.py
+++ b/src/misc.py
@@ -60,12 +60,16 @@ def getArduinoPath():
def getArduinoVariantPath():
b = board.Board()
- return get_path("hardware/arduino/variants/"+b.getVariant(b.getBoard()))
+ variant = b.getVariant(b.getBoard())
+ if variant:
+ return get_path("hardware/arduino/variants/" + variant)
def getArduinoIncludes():
includes = ["-I" + getArduinoPath()]
if getArduinoVersion() >= 100:
- includes += ["-I" + getArduinoVariantPath()]
+ variant = getArduinoVariantPath()
+ if variant:
+ includes += ["-I" + getArduinoVariantPath()]
return includes
def getArduinoBootPath():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]