Version
0.0.20
Bug description
Refer to DCC-EX/Support-Planning#945 for the user error reported.
@habazut narrowed it down to this method in file_manager.py:
def dir_is_empty(dir):
"""
Check if directory is empty
Returns True if so, False if not
"""
if os.listdir(dir) > 0:
return False
else:
return True
Steps to reproduce the bug
.
Expected behaviour
This method should return true or false based on the directory contents, not generate a type error.
Screenshots
No response
Additional context
The correct (and succinct) method should be:
def dir_is_empty(directory):
"""
Check if directory is empty.
Returns True if empty, False otherwise.
"""
return len(os.listdir(directory)) == 0
Version
0.0.20
Bug description
Refer to DCC-EX/Support-Planning#945 for the user error reported.
@habazut narrowed it down to this method in file_manager.py:
Steps to reproduce the bug
.
Expected behaviour
This method should return true or false based on the directory contents, not generate a type error.
Screenshots
No response
Additional context
The correct (and succinct) method should be: