diff options
author | Josh Blum | 2010-03-16 18:22:10 -0700 |
---|---|---|
committer | Josh Blum | 2010-03-16 18:22:10 -0700 |
commit | d43d40813c1a8343a86abb231876a8b7c0e9f806 (patch) | |
tree | e919c7da99aca7918ca5533e899cd7c9bbbf76bd /grc | |
parent | 19d3c0cab37123f8bfd19fdfc576f44b6069300f (diff) | |
parent | ac422b700282e21956dbf7643ee2dfbeeebdaf45 (diff) | |
download | gnuradio-d43d40813c1a8343a86abb231876a8b7c0e9f806.tar.gz gnuradio-d43d40813c1a8343a86abb231876a8b7c0e9f806.tar.bz2 gnuradio-d43d40813c1a8343a86abb231876a8b7c0e9f806.zip |
Merge branch 'master' of http://gnuradio.org/git/gnuradio into uhd
Diffstat (limited to 'grc')
-rw-r--r-- | grc/python/Generator.py | 7 | ||||
-rw-r--r-- | grc/python/Platform.py | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/grc/python/Generator.py b/grc/python/Generator.py index ed7995716..acd98ef84 100644 --- a/grc/python/Generator.py +++ b/grc/python/Generator.py @@ -1,5 +1,5 @@ """ -Copyright 2008, 2009 Free Software Foundation, Inc. +Copyright 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA import os import subprocess +import tempfile from Cheetah.Template import Template import expr_utils from Constants import \ @@ -45,6 +46,10 @@ class Generator(object): else: self._mode = TOP_BLOCK_FILE_MODE 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) diff --git a/grc/python/Platform.py b/grc/python/Platform.py index bb56d361b..04db0b9b0 100644 --- a/grc/python/Platform.py +++ b/grc/python/Platform.py @@ -1,5 +1,5 @@ """ -Copyright 2008, 2009 Free Software Foundation, Inc. +Copyright 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or @@ -64,7 +64,7 @@ class Platform(_Platform, _GUIPlatform): version=gr.version(), key='grc', license=__doc__.strip(), - website='http://gnuradio.org/trac/wiki/GNURadioCompanion', + website='http://gnuradio.org/redmine/wiki/gnuradio/GNURadioCompanion', block_paths=block_paths, block_dtd=BLOCK_DTD, default_flow_graph=DEFAULT_FLOW_GRAPH, |