[Calypso] [PATCH] Remove last print statements

Guido Günther agx at sigxcpu.org
Sun Apr 10 03:10:13 PDT 2016


Using log.* instead.
---

The first one is debatable since this is for the command line import but
this should go to stderr at least then. So lets rather use the logging
infrastructure.

 calypso.py          | 2 +-
 calypso/xmlutils.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/calypso.py b/calypso.py
index 78baa91..09fe62d 100755
--- a/calypso.py
+++ b/calypso.py
@@ -118,7 +118,7 @@ if options.import_dest:
     try:
         collection = webdav.Collection(options.import_dest)
     except Exception:
-        print "Cannot open collection %s" % options.import_dest
+        log.error("Cannot open collection %s" % options.import_dest)
         sys.exit(1)
     success = True
     for arg in args:
diff --git a/calypso/xmlutils.py b/calypso/xmlutils.py
index 127076c..2d904b3 100644
--- a/calypso/xmlutils.py
+++ b/calypso/xmlutils.py
@@ -124,7 +124,7 @@ def propfind(path, xml_request, collection, depth, context):
     if collection:
         if item_name:
             item = collection.get_item(item_name)
-            print "item_name %s item %s" % (item_name, item)
+            log.debug("item_name %s item %s" % (item_name, item))
             if item:
                 items = [item]
             else:
-- 
2.8.0.rc3


More information about the Calypso mailing list