[CalendarServer-changes] [11220] CalDAVClientLibrary/trunk/caldavclientlibrary/browser

source_changes at macosforge.org source_changes at macosforge.org
Fri May 17 19:34:26 PDT 2013


Revision: 11220
          http://trac.calendarserver.org//changeset/11220
Author:   cdaboo at apple.com
Date:     2013-05-17 19:34:26 -0700 (Fri, 17 May 2013)
Log Message:
-----------
Fix sub-shell history problem. Allow interactive shell when no notifications present.

Modified Paths:
--------------
    CalDAVClientLibrary/trunk/caldavclientlibrary/browser/baseshell.py
    CalDAVClientLibrary/trunk/caldavclientlibrary/browser/commands/notifications.py

Modified: CalDAVClientLibrary/trunk/caldavclientlibrary/browser/baseshell.py
===================================================================
--- CalDAVClientLibrary/trunk/caldavclientlibrary/browser/baseshell.py	2013-05-18 02:04:35 UTC (rev 11219)
+++ CalDAVClientLibrary/trunk/caldavclientlibrary/browser/baseshell.py	2013-05-18 02:34:26 UTC (rev 11220)
@@ -64,6 +64,7 @@
         # Preserve existing history
         if self.preserve_history:
             old_history = [readline.get_history_item(index) for index in xrange(readline.get_current_history_length())]
+            old_history = filter(lambda x: x is not None, old_history)
             readline.clear_history()
             map(readline.add_history, self.history)
 

Modified: CalDAVClientLibrary/trunk/caldavclientlibrary/browser/commands/notifications.py
===================================================================
--- CalDAVClientLibrary/trunk/caldavclientlibrary/browser/commands/notifications.py	2013-05-18 02:04:35 UTC (rev 11219)
+++ CalDAVClientLibrary/trunk/caldavclientlibrary/browser/commands/notifications.py	2013-05-18 02:34:26 UTC (rev 11220)
@@ -60,13 +60,10 @@
         resource = principal.notification_URL
 
         notifications = self.shell.account.session.getNotifications(resource)
-        if not notifications:
-            print "No notifications."
+        if interactive:
+            self.doInteractiveMode(resource, notifications)
         else:
-            if interactive:
-                self.doInteractiveMode(resource, notifications)
-            else:
-                print utils.printNotificationsList(notifications, self.shell.account)
+            print utils.printNotificationsList(notifications, self.shell.account)
 
         return True
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130517/d2eeb94f/attachment.html>


More information about the calendarserver-changes mailing list