Skip to content

Commit

Permalink
Fixes #3254 Cookbook generation crashes using empty meta example files.
Browse files Browse the repository at this point in the history
  • Loading branch information
arianepaola committed Jun 8, 2016
1 parent d6407a5 commit de6e23a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/meta/generator/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def parse(self, programString, filePath="Unknown"):
"""

# Add trailing endline if missing
if programString[-1] != "\n":
if len(programString) and programString[-1] != "\n":
programString += "\n"

# Parse program and add FilePath key to object
Expand Down

0 comments on commit de6e23a

Please sign in to comment.