|
@@ -174,7 +174,9 @@ int start_mon(const char *name, const char *output, int select,
|
|
" grass.fatal(\"Unable to open file '%s'\")\n"
|
|
" grass.fatal(\"Unable to open file '%s'\")\n"
|
|
"lines = fd.readlines()\n"
|
|
"lines = fd.readlines()\n"
|
|
"for l in lines:\n"
|
|
"for l in lines:\n"
|
|
- " k, v = l.rstrip('\\n').split('=')\n"
|
|
|
|
|
|
+ " if l.startswith('#'):\n"
|
|
|
|
+ " continue\n"
|
|
|
|
+ " k, v = l.rstrip('\\n').split('#', 1)[0].strip().split('=', 1)\n"
|
|
" os.environ[k] = v\n"
|
|
" os.environ[k] = v\n"
|
|
"fd.close()\n\n"
|
|
"fd.close()\n\n"
|
|
"# run display command\n"
|
|
"# run display command\n"
|