Minor fixes

This commit is contained in:
Ivan Kravets
2017-08-17 23:55:42 +03:00
parent 743de42484
commit 4ff1d640b3
3 changed files with 6 additions and 6 deletions

View File

@ -5,10 +5,10 @@ PlatformIO 3.0
--------------
3.5.0 (2017-??-??)
~~~~~~~~~~~~~~~~~~
* PIO Home
~~~~~~~~~~~~~~~~~~
3.4.1 (2017-08-02)
~~~~~~~~~~~~~~~~~~

View File

@ -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()

View File

@ -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)