Skip to content

Commit

Permalink
use quote_str function in set_environment function
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Feb 11, 2013
1 parent 4933ff8 commit a2a0c98
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions easybuild/tools/module_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from easybuild.tools.config import install_path
from easybuild.tools.filetools import rmtree2
from easybuild.tools.modules import Modules
from easybuild.tools.utilities import quote_str


log = get_log('moduleGenerator')
Expand Down Expand Up @@ -177,8 +178,8 @@ def set_environment(self, key, value):
"""
Generate setenv statement for the given key/value pair.
"""
# Double quotes are needed, to ensure smooth working of EBDEVEL* modulefiles
return 'setenv\t%s\t\t"%s"\n' % (key, value)
# quotes are needed, to ensure smooth working of EBDEVEL* modulefiles
return 'setenv\t%s\t\t%s\n' % (key, quote_str(value))

def __del__(self):
"""
Expand Down

0 comments on commit a2a0c98

Please sign in to comment.