diff options
Diffstat (limited to 'registry/generator.py')
-rw-r--r-- | registry/generator.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/registry/generator.py b/registry/generator.py index 01274a3..7cc1b28 100644 --- a/registry/generator.py +++ b/registry/generator.py @@ -43,7 +43,10 @@ def enquote(s): """Return string argument with surrounding quotes, for serialization into Python code.""" if s: - return "'{}'".format(s) + if isinstance(s, str): + return "'{}'".format(s) + else: + return s return None @@ -778,7 +781,6 @@ class OutputGenerator: self.warnFile.flush() if self.diagFile: self.diagFile.flush() - self.outFile.flush() if self.outFile != sys.stdout and self.outFile != sys.stderr: self.outFile.close() |