small python config related fixes.
authorNathan Binkert <binkertn@umich.edu>
Thu, 3 Feb 2005 19:33:02 +0000 (14:33 -0500)
committerNathan Binkert <binkertn@umich.edu>
Thu, 3 Feb 2005 19:33:02 +0000 (14:33 -0500)
dev/simconsole.cc:
sim/universe.cc:
    isValid isn't compatible with new python stuff, so whack it.

--HG--
extra : convert_revision : 0c50038769a558650479c51122a8be5d92e7d9c4

dev/simconsole.cc
sim/universe.cc

index d8d890e15d69af42b059482558606535fefe7e8d..48e5d0201f92f1438683e673386b8a36e046d457 100644 (file)
@@ -315,7 +315,7 @@ CREATE_SIM_OBJECT(SimConsole)
 {
     string filename;
 
-    if (!output.isValid()) {
+    if (filename.empty()) {
         filename = getInstanceName();
     } else if (append_name) {
         filename = (string)output + "." + getInstanceName();
index 52353db11caee5557e8641b12fb923bed4289cdd..115f6f790ed3badfb05d4c58320768dc6e9a7edf 100644 (file)
@@ -143,7 +143,8 @@ CREATE_SIM_OBJECT(Root)
     __ticksPerNS = freq / 1.0e9;
     __ticksPerPS = freq / 1.0e12;
 
-    if (output_dir.isValid()) {
+    outputDirectory = output_dir;
+    if (!outputDirectory.empty()) {
         outputDirectory = output_dir;
 
         // guarantee that directory ends with a '/'
@@ -159,9 +160,10 @@ CREATE_SIM_OBJECT(Root)
     }
 
     outputStream = makeOutputStream(output_file);
-    configStream = config_output_file.isValid()
-        ? makeOutputStream(config_output_file)
-        : outputStream;
+    configStream = outputStream;
+    string cof = config_output_file;
+    if (!cof.empty())
+        configStream = makeOutputStream(cof);
 
     return root;
 }