summaryrefslogtreecommitdiff
diff options
authorRod Smith <rod.smith@canonical.com>2015-01-29 11:57:28 -0500
committerRod Smith <rod.smith@canonical.com>2015-01-29 11:57:28 -0500
commit6e2b1ea99bebd34a39adcf390f979364905d1554 (patch)
treefe127fe88216403584a6a13fe85bdbb8d75b7f5e
parentffff5ad0460c1b7d95c50dafe33dc96b809fc2b5 (diff)
Changed method of checking for console (non-redirected) output to use sys.stdout.isatty()
-rwxr-xr-xbin/virtualization2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/virtualization b/bin/virtualization
index 38e7231e..dbd8c9d6 100755
--- a/bin/virtualization
+++ b/bin/virtualization
@@ -329,7 +329,7 @@ final_message: CERTIFICATION BOOT COMPLETE
time.sleep(self.timeout)
# If running in console, reset console window to regain
# control from VM Serial I/0
- if os.fstat(0) == os.fstat(1):
+ if sys.stdout.isatty():
call('reset')
# Check to be sure VM boot was successful
with open(self.debug_file, 'r') as debug_file: