diff mx/commands.py @ 8901:8ddaac81cb21

Be more careful while updating jvm.cfg (fixes a bug where the -server configuration would overwrite the -server0 one)
author Gilles Duboscq <duboscq@ssw.jku.at>
date Mon, 08 Apr 2013 18:47:06 +0200
parents 822163edb8bf
children 08a16c26907f
line wrap: on
line diff
--- a/mx/commands.py	Mon Apr 08 18:40:18 2013 +0200
+++ b/mx/commands.py	Mon Apr 08 18:47:06 2013 +0200
@@ -658,8 +658,8 @@
         if not exists(jvmCfg):
             mx.abort(jvmCfg + ' does not exist')
 
-        prefix = '-' + vm
-        vmKnown = prefix + ' KNOWN\n'
+        prefix = '-' + vm + ' '
+        vmKnown = prefix + 'KNOWN\n'
         lines = []
         found = False
         with open(jvmCfg) as f:
@@ -669,7 +669,7 @@
                 lines.append(line)
                 
         if not found:
-            mx.log('Appending "' + prefix + ' KNOWN" to ' + jvmCfg)
+            mx.log('Appending "' + prefix + 'KNOWN" to ' + jvmCfg)
             if mx.get_os() != 'windows':
                 os.chmod(jvmCfg, 0755)
             with open(jvmCfg, 'w') as f: