mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-06 22:08:51 +00:00
Drop pytz, use dateutil.tz.
Bring in small fixes from trunk Monotone-Parent: 18bd3484373fa731cf9a3ac7ca3ce35afbf03cdd Monotone-Revision: 1efb09bf023898a5a0088c9ba29ca00f1a304611 Monotone-Author: jraby@inverse.ca Monotone-Date: 2012-02-02T18:05:36
This commit is contained in:
@@ -15,3 +15,5 @@ ADDITIONAL_LIB_DIRS += \
|
||||
-L../../SOPE/GDLContentStore/$(GNUSTEP_OBJ_DIR)/ -lGDLContentStore \
|
||||
-L../../SOPE/NGCards/$(GNUSTEP_OBJ_DIR)/ -lNGCards \
|
||||
-L/usr/local/lib -L/usr/lib -lEOControl -lNGStreams -lNGMime -lNGExtensions
|
||||
|
||||
ADDITIONAL_LDFLAGS += -Wl,--no-as-needed
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
setup
|
||||
-----
|
||||
|
||||
(you need "python-simplejson", "python-xml", "python-vobject" and "python-m2crypto"
|
||||
(you need "python-simplejson", "python-xml", "python-vobject", "python-dateutil" and "python-m2crypto"
|
||||
in order to run the scripts on Debian)
|
||||
|
||||
1) copy config.py.in to config.py (make sure to never EVER add it to monotone)
|
||||
|
||||
@@ -8,10 +8,10 @@ from config import hostname, port, username, password, \
|
||||
resource_no_overbook, resource_can_overbook
|
||||
|
||||
import datetime
|
||||
import dateutil.tz
|
||||
import sogotests
|
||||
import sys
|
||||
import time
|
||||
import pytz
|
||||
import unittest
|
||||
import utilities
|
||||
import vobject
|
||||
@@ -143,7 +143,7 @@ class CalDAVITIPDelegationTest(unittest.TestCase):
|
||||
vevent.add('summary').value = summary
|
||||
vevent.add('transp').value = transparency[transp]
|
||||
|
||||
now = datetime.datetime.now(pytz.timezone("America/Montreal"))
|
||||
now = datetime.datetime.now(dateutil.tz.gettz("America/Montreal"))
|
||||
startdate = vevent.add('dtstart')
|
||||
startdate.value = now
|
||||
enddate = vevent.add('dtend')
|
||||
|
||||
@@ -30,6 +30,7 @@ import sys
|
||||
|
||||
xmlns_dav = "DAV:"
|
||||
xmlns_caldav = "urn:ietf:params:xml:ns:caldav"
|
||||
xmlns_carddav = "urn:ietf:params:xml:ns:carddav"
|
||||
xmlns_inversedav = "urn:inverse:params:xml:ns:inverse-dav"
|
||||
|
||||
url_re = None
|
||||
@@ -401,6 +402,25 @@ class CalDAVCalendarQuery(WebDAVREPORT):
|
||||
filter_node.append(cal_filter_node)
|
||||
self.top_node.append(filter_node)
|
||||
|
||||
class CardDAVAddressBookQuery(WebDAVREPORT):
|
||||
def __init__(self, url, properties, searchProperty = None, searchValue = None):
|
||||
WebDAVQuery.__init__(self, url)
|
||||
query_tag = self.ns_mgr.register("addressbook-query", xmlns_carddav)
|
||||
ns_key = self.ns_mgr.xmlns[xmlns_carddav]
|
||||
self.top_node = _WD_XMLTreeElement(query_tag)
|
||||
if properties is not None and len(properties) > 0:
|
||||
self._initProperties(properties)
|
||||
|
||||
if searchProperty is not None:
|
||||
filter_node = _WD_XMLTreeElement("%s:filter" % ns_key)
|
||||
self.top_node.append(filter_node)
|
||||
propfilter_node = _WD_XMLTreeElement("%s:prop-filter" % ns_key, { "name": searchProperty })
|
||||
filter_node.append(propfilter_node)
|
||||
match_node = _WD_XMLTreeElement("%s:text-match" % ns_key,
|
||||
{ "collation": "i;unicasemap", "match-type": "starts-with" })
|
||||
propfilter_node.append(match_node)
|
||||
match_node.appendSubtree(None, searchValue)
|
||||
|
||||
class MailDAVMailQuery(WebDAVREPORT):
|
||||
def __init__(self, url, properties, filters = None,
|
||||
sort = None, ascending = True):
|
||||
|
||||
Reference in New Issue
Block a user