-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This addresses a problem caused by files in which a source element ha… #80
Conversation
…s no name attribute. Mutator uses the value of the name attribute to store some data and retrieve it later. This adds a temporary simple unique name.
Lib/mutatorMath/ufo/document.py
Outdated
@@ -502,12 +502,19 @@ def readSources(self): | |||
</source> | |||
|
|||
""" | |||
sourceCount = 0 | |||
for sourceElement in self.root.findall(".sources/source"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could also do this instead:
-sourceCount = 0
-for sourceElement in self.root.findall(".sources/source"):
- sourceCount+=1
+for sourceCount, sourceElement in enumerate(self.root.findall(".sources/source")):
Lib/mutatorMath/ufo/document.py
Outdated
# (some authoring tools do not need them) | ||
# then we should make a temporary one | ||
sourceName = "temp_master.%d"%(sourceCount) | ||
print("created temp source name", sourceName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use self.logger
instead of print
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other than the minor comments above, LGTM
Thank you! |
Remove print.
…s no name attribute. Mutator uses the value of the name attribute to store some data and retrieve it later. This adds a temporary simple unique name.