summaryrefslogtreecommitdiff
path: root/grc/core/generator/Generator.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/core/generator/Generator.py')
-rw-r--r--grc/core/generator/Generator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/grc/core/generator/Generator.py b/grc/core/generator/Generator.py
index fb7a3afb99..3062440814 100644
--- a/grc/core/generator/Generator.py
+++ b/grc/core/generator/Generator.py
@@ -74,13 +74,14 @@ class TopBlockGenerator(object):
self._flow_graph = FlowGraphProxy(flow_graph)
self._generate_options = self._flow_graph.get_option('generate_options')
self._mode = TOP_BLOCK_FILE_MODE
- dirname = self._dirname = os.path.dirname(file_path)
+ dirname = os.path.dirname(file_path)
# Handle the case where the directory is read-only
# In this case, use the system's temp directory
if not os.access(dirname, os.W_OK):
dirname = tempfile.gettempdir()
filename = self._flow_graph.get_option('id') + '.py'
self.file_path = os.path.join(dirname, filename)
+ self._dirname = dirname
def get_file_path(self):
return self.file_path