Skip to content

Commit

Permalink
Minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Jun 2, 2016
1 parent bf00535 commit 9a75b10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Cheetah/SettingsManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def updateSettings(self, new_settings):

def updateSettingsFromConfigStr(self, config_str):
values = [line.split('=', 1) for line in config_str.strip().splitlines()]
settings = dict(
(key.strip(), convert_value(value.strip()))
settings = {
key.strip(): convert_value(value.strip())
for key, value in values
)
}
self.updateSettings(settings)
2 changes: 1 addition & 1 deletion Cheetah/legacy_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def addImportedVarNames(self, varNames, raw_statement=None):
if not varNames:
return
if not self.setting('useLegacyImportMode'):
if raw_statement and getattr(self, '_methodBodyChunks'):
if raw_statement and self._methodBodyChunks:
self.addChunk(raw_statement)
else:
self._global_vars.update(varNames)
Expand Down

0 comments on commit 9a75b10

Please sign in to comment.