Skip to content

Commit

Permalink
Name fix for calculateObjectsInSections and folder not found error pr…
Browse files Browse the repository at this point in the history
…int fix

Details:
    - Renaming caluclateObjectsInSections to calculateObjectsInSections
    - Error message fix in checkIfFolderExists: the abspath will be printet from now on
  • Loading branch information
KGergo88 committed Jul 5, 2019
1 parent 32e79bc commit e5c8b4c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion emma.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def main(args):

sc.header("Preparing objects in sections summary", symbol=".")

objectsInSections = emma_libs.memoryMap.caluclateObjectsInSections(sectionSummary.consumerCollection, objectSummary.consumerCollection)
objectsInSections = emma_libs.memoryMap.calculateObjectsInSections(sectionSummary.consumerCollection, objectSummary.consumerCollection)
emma_libs.memoryMap.memoryMapToCSV(args.dir, args.subdir, args.project, objectsInSections)


Expand Down
4 changes: 2 additions & 2 deletions emma_libs/memoryMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import emma_libs.memoryManager


def caluclateObjectsInSections(sectionContainer, objectContainer):
def calculateObjectsInSections(sectionContainer, objectContainer):
"""
Assumptions:
- The sectionCollection is a list of MemEntry objects:
Expand Down Expand Up @@ -141,7 +141,7 @@ def cutOffTheBeginningOfTheSection(sectionToCut, newAddressStart):

def memoryMapToCSV(argsDir, argsSubdir, argsProject, memoryMap):
"""
Writes the memoryMap created in caluclateObjectsInSections(...) to CSV
Writes the memoryMap created in calculateObjectsInSections(...) to CSV
"""
filepath = emma_libs.memoryManager.createMemStatsFilepath(argsDir, argsSubdir, FILE_IDENTIFIER_OBJECTS_IN_SECTIONS, os.path.split(os.path.normpath(argsProject))[-1])
emma_libs.memoryManager.consumerCollectionToCSV(filepath, memoryMap)
2 changes: 1 addition & 1 deletion shared_libs/emma_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def checkIfFolderExists(folderName):
:param folderName: Project to check
"""
if not os.path.isdir(folderName):
sc.error("Given directory (" + folderName + ") does not exist; exiting...")
sc.error("Given directory (" + os.path.abspath(folderName) + ") does not exist; exiting...")
sys.exit(-10)


Expand Down

0 comments on commit e5c8b4c

Please sign in to comment.