Re: [libvirt] [test-API][PATCH] Fix the screenshot case

2013-01-22 Thread Guannan Ren

On 01/22/2013 02:27 PM, Wayne Sun wrote:

Fix missing sharemod and nonexist filename

Signed-off-by: Wayne Sun g...@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.

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


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

2013-01-21 Thread Wayne Sun
Fix missing sharemod and nonexist filename

Signed-off-by: Wayne Sun g...@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)
 
-- 
1.7.1

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