On 01/22/2013 02:27 PM, Wayne Sun wrote:
Fix missing sharemod and nonexist filename
Signed-off-by: Wayne Sun <gsun(a)redhat.com>
---
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)
ACK and pushed.
Thanks.