[test-API][PATCH] Fix the screenshot case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix missing sharemod and nonexist filename

Signed-off-by: Wayne Sun <gsun@xxxxxxxxxx>
---
 repos/domain/screenshot.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/repos/domain/screenshot.py b/repos/domain/screenshot.py
index c0db17f..8284fb4 100644
--- a/repos/domain/screenshot.py
+++ b/repos/domain/screenshot.py
@@ -6,6 +6,7 @@ import os
 import mimetypes
 
 import libvirt
+from src import sharedmod
 
 required_params = ('guestname', 'filename',)
 optional_params = {'screen' : 0}
@@ -30,9 +31,9 @@ def screenshot(params):
 
     ext = mimetypes.guess_extension(mime) or '.ppm'
     last_filename = params['filename'] + ext
-    f = file(filename, 'w')
+    f = file(last_filename, 'w')
 
-    logger.debug('Saving screenshot into %s' % filename)
+    logger.debug('Saving screenshot into %s' % last_filename)
     st.recvAll(saver, f)
     logger.debug('Mimetype of the file is %s' % mime)
 
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]