small python config related fixes.
dev/simconsole.cc: sim/universe.cc: isValid isn't compatible with new python stuff, so whack it. --HG-- extra : convert_revision : 0c50038769a558650479c51122a8be5d92e7d9c4
This commit is contained in:
parent
15e1ad8f6b
commit
936ad58402
|
@ -315,7 +315,7 @@ CREATE_SIM_OBJECT(SimConsole)
|
||||||
{
|
{
|
||||||
string filename;
|
string filename;
|
||||||
|
|
||||||
if (!output.isValid()) {
|
if (filename.empty()) {
|
||||||
filename = getInstanceName();
|
filename = getInstanceName();
|
||||||
} else if (append_name) {
|
} else if (append_name) {
|
||||||
filename = (string)output + "." + getInstanceName();
|
filename = (string)output + "." + getInstanceName();
|
||||||
|
|
|
@ -143,7 +143,8 @@ CREATE_SIM_OBJECT(Root)
|
||||||
__ticksPerNS = freq / 1.0e9;
|
__ticksPerNS = freq / 1.0e9;
|
||||||
__ticksPerPS = freq / 1.0e12;
|
__ticksPerPS = freq / 1.0e12;
|
||||||
|
|
||||||
if (output_dir.isValid()) {
|
outputDirectory = output_dir;
|
||||||
|
if (!outputDirectory.empty()) {
|
||||||
outputDirectory = output_dir;
|
outputDirectory = output_dir;
|
||||||
|
|
||||||
// guarantee that directory ends with a '/'
|
// guarantee that directory ends with a '/'
|
||||||
|
@ -159,9 +160,10 @@ CREATE_SIM_OBJECT(Root)
|
||||||
}
|
}
|
||||||
|
|
||||||
outputStream = makeOutputStream(output_file);
|
outputStream = makeOutputStream(output_file);
|
||||||
configStream = config_output_file.isValid()
|
configStream = outputStream;
|
||||||
? makeOutputStream(config_output_file)
|
string cof = config_output_file;
|
||||||
: outputStream;
|
if (!cof.empty())
|
||||||
|
configStream = makeOutputStream(cof);
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue