From 4ff1d640b393c9f6e43871a5b214880e66756161 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 17 Aug 2017 23:55:42 +0300 Subject: [PATCH] Minor fixes --- HISTORY.rst | 2 +- platformio/builder/tools/piolib.py | 2 +- platformio/util.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index d076ce7a..5b46cafc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,10 +5,10 @@ PlatformIO 3.0 -------------- 3.5.0 (2017-??-??) +~~~~~~~~~~~~~~~~~~ * PIO Home -~~~~~~~~~~~~~~~~~~ 3.4.1 (2017-08-02) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index ddc8229e..391b5084 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -712,7 +712,7 @@ def BuildProjectLibraries(env): print "Library Dependency Graph" print_deps_tree(project) else: - print "Project does not have dependencies" + print "No dependencies" return project.build() diff --git a/platformio/util.py b/platformio/util.py index 07b2b33d..03f6f134 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -152,8 +152,8 @@ class memoized(object): class throttle(object): - def __init__(self, limit): - self.limit = limit # milliseconds + def __init__(self, threshhold): + self.threshhold = threshhold # milliseconds self.last = 0 def __call__(self, fn): @@ -161,8 +161,8 @@ class throttle(object): @wraps(fn) def wrapper(*args, **kwargs): diff = int(round((time() - self.last) * 1000)) - if diff < self.limit: - sleep((self.limit - diff) * 0.001) + if diff < self.threshhold: + sleep((self.threshhold - diff) * 0.001) self.last = time() return fn(*args, **kwargs)