Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 946 by timco...@gmail.com: examplelibrary.py for RemoteServer has
incomplete list comprehension
http://code.google.com/p/robotframework/issues/detail?id=946
examplelibrary.py on this page: http://bit.ly/oAKga4
includes this function:
def count_items_in_directory(self, path):
return len(i for i in os.listdir(path) if not i.startswith('.'))
which should look like this:
def count_items_in_directory(self, path):
return len([i for i in os.listdir(path) if not i.startswith('.')])
otherwise it creates the following error when invoked:
Count Items in Directory |
FAIL |
TypeError: object of type 'generator' has no len()
using python 2.7.1 on stock fedora 15