Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions create_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def getListOfFiles(dirName):
# create a list of file and sub directories
# names in the given directory
listOfFile = os.listdir(dirName)
allFiles = list()
allFiles = []
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getListOfFiles refactored with the following changes:

# Iterate over all the entries
for entry in listOfFile:
# Create full path
Expand All @@ -112,7 +112,7 @@ def getListOfFiles(dirName):
allFiles = allFiles + getListOfFiles(fullPath)
else:
allFiles.append(fullPath)

return allFiles


Expand All @@ -121,17 +121,16 @@ def getListOfMetadataFiles(dirName):
# create a list of file and sub directories
# names in the given directory
listOfFile = os.listdir(dirName)
allFiles = list()
allFiles = []
# Iterate over all the entries
for entry in listOfFile:
# Create full path
fullPath = os.path.join(dirName, entry)
# If entry is a directory then get the list of files in this directory
# If entry is a directory then get the list of files in this directory
if os.path.isdir(fullPath):
allFiles = allFiles + getListOfFiles(fullPath)
else:
if regex.match(fullPath):
allFiles.append(fullPath)
elif regex.match(fullPath):
allFiles.append(fullPath)
Comment on lines -124 to +133
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getListOfMetadataFiles refactored with the following changes:


#filtered = [i for i in full if not regex.match(i)]
#return filtered
Expand Down
Loading