1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-10 18:40:53 +00:00

Remove Python 2 support

This commit is contained in:
Guillaume Ayoub 2016-03-31 19:57:40 +02:00
parent fa4eaef08e
commit 434cb533e9
34 changed files with 71 additions and 187 deletions

View file

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
#
# This file is part of Radicale Server - Calendar Server
# Copyright © 2013 Guillaume Ayoub
#
@ -24,6 +22,7 @@ SQLAlchemy storage backend.
import time
from datetime import datetime
from contextlib import contextmanager
from sqlalchemy import create_engine, Column, Unicode, Integer, ForeignKey
from sqlalchemy import func
from sqlalchemy.orm import sessionmaker, relationship
@ -104,7 +103,7 @@ class Collection(ical.Collection):
"""Collection stored in a database."""
def __init__(self, path, principal=False):
self.session = Session()
super(Collection, self).__init__(path, principal)
super().__init__(path, principal)
def __del__(self):
self.session.commit()