pombreda / gcalcli

Automatically exported from code.google.com/p/gcalcli
0 stars 0 forks source link

Problem using --cals=default when printing agenda #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. gcalcli --nc --cals=default agenda

What is the expected output? What do you see instead?

Expected:

$ gcalcli --nc --cals=default agenda

Current Time: Tue Oct  2 13:44:41 2007

Agenda for [ Tue Oct  2 00:00:00 2007 <-> Sun Oct  7 00:00:00 2007 ]

Tue Oct 02   5:00P   Soccer snack
             5:30P   JVB at Westerville North
             7:30P   NWCC Personnel meeting

Wed Oct 03  12:00P   Shirley Benson's Birthday
             5:30P   JVB at Olentangy

Thu Oct 04   6:30P   NWCC Property Stewards

Sat Oct 06  10:00P   JVB vs. Lexington at Davidson Field B

Reality:

$ gcalcli --nc --cals=default agenda

Current Time: Tue Oct  2 13:46:44 2007

Agenda for [ Tue Oct  2 00:00:00 2007 <-> Sun Oct  7 00:00:00 2007 ]

No Events Found...

What version of the product are you using? On what operating system?

1.2 on Mac OS X 10.4

Please provide any additional information below.

Here is the patch that I applied to the code that seems to make it behave 
correctly (also attached):

*** ./gcalcli   Tue Oct  2 13:46:38 2007
--- /Users/keith/bin/gcalcli    Tue Oct  2 13:44:34 2007
***************
*** 245,258 ****

      def _CalendarWithinAccess(self, cal):

!         if (self.access == self.ACCESS_ALL):

              return True

!         elif ((self.access == self.ACCESS_DEFAULT) and
!               (cal.gcalcli_username != self.username)):

!             return False

          elif (self.access != cal.access_level.value):

--- 245,258 ----

      def _CalendarWithinAccess(self, cal):

!         if ((self.access == self.ACCESS_DEFAULT) and
!               (cal.gcalcli_username == self.username)):

              return True

!         elif (self.access == self.ACCESS_ALL):

!             return True

          elif (self.access != cal.access_level.value):

Original issue reported on code.google.com by bkeithr...@gmail.com on 2 Oct 2007 at 5:56

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for the fix.  The latest version of gcalcli in svn now works with the
--cals=default switch.

Original comment by insa...@gmail.com on 2 Oct 2007 at 6:57

GoogleCodeExporter commented 9 years ago

Original comment by insa...@gmail.com on 5 Oct 2007 at 5:24

GoogleCodeExporter commented 9 years ago

Original comment by eda...@insanum.com on 27 Jul 2011 at 4:59