WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Add some exception logging.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Add some exception logging.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Dec 2006 10:50:21 +0000
Delivery-date: Fri, 15 Dec 2006 02:50:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID d0f682ada0b2c159b3cda78fdbf9e8c38082fcc8
# Parent  c91f6506b270be0ceabf3bb25fc8db5775b92493
Add some exception logging.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendStorageRepository.py |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff -r c91f6506b270 -r d0f682ada0b2 
tools/python/xen/xend/XendStorageRepository.py
--- a/tools/python/xen/xend/XendStorageRepository.py    Thu Dec 14 14:54:24 
2006 +0000
+++ b/tools/python/xen/xend/XendStorageRepository.py    Thu Dec 14 15:10:47 
2006 +0000
@@ -20,6 +20,7 @@
 #
 
 import commands
+import logging
 import os
 import stat
 import threading
@@ -35,7 +36,10 @@ XEND_STORAGE_VDICFG_FILENAME = "%s.vdi.x
 XEND_STORAGE_VDICFG_FILENAME = "%s.vdi.xml"
 QCOW_CREATE_COMMAND = "/usr/sbin/qcow-create %d %s"
 
-MB = 1024 *1024
+MB = 1024 * 1024
+
+log = logging.getLogger("xend.XendStorageRepository")
+
 
 class DeviceInvalidError(Exception):
     pass
@@ -89,8 +93,7 @@ class XendStorageRepository:
                 open(uuid_file, 'w').write(new_uuid + '\n')
                 return new_uuid
         except IOError:
-            # TODO: log warning
-            pass
+            log.exception()
 
         return uuid.createString()
 
@@ -229,8 +232,7 @@ class XendStorageRepository:
                     if cfg_path and os.path.exists(cfg_path):
                         os.unlink(cfg_path)
                 except OSError:
-                    # TODO: log warning
-                    pass
+                    log.exception()
                 del self.images[image_uuid]
                 return True
         finally:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Add some exception logging., Xen patchbot-unstable <=