Je sais que c'est entries.synchronies qui plante parce que si je fais un print "machintruc" entre entries.synchronize() et collections.synchronize(), il est affiché, et c'est justement ça qui est bizarre
ation of entries
entries = BookSet(server, client)
entries.synchronize()
entries.close()
J'ai un peu fait le ménage en supprimant la majorité du code, histoire que ça soit lisible : #!/usr/bin/python
# coding=utf-8
import pysync
import pysync2
import sqlite3
import os.path
import os
import string
import fileinput
import datetime
import time
import shutil
import sys
import getopt
client = "/Users/flanker/Downloads/Bookpedia"
client = "/Users/flanker/Library/Application Support/Bookpedia"
server = "/Users/flanker/Downloads/Bookpedia2"
class CollectionSet(pysync.PySyncSet):
clientDirectory = None
serverDirectory = None
def __init__(self, server, client):
self.clientDirectory = client
self.serverDirectory = server
def close(self):
self.serverDataBase.commit()
def newElement(self, uuid):
return CollectionElement(uuid, self)
class CollectionElement(pysync.PySyncElement):
CollectionBase = None
def __init__(self, uuid, CollectionBase):
self.uuid = uuid
self.CollectionBase = CollectionBase
def add(self, side):
if not self.quiet:
def remove(self, side):
if not self.quiet:
def modify(self, side):
if not self.quiet:
def display(self, side):
if self.verbose:
def diff(self):
if self.quiet:
class BookSet(pysync2.PySyncSet):
def __init__(self, server, client):
self.clientDirectory = client
self.serverDirectory = server
def close(self):
self.last_synchronization = datetime.datetime.now()
def newElement(self, uuid):
return BookElement(uuid, self)
class BookElement(pysync2.PySyncElement):
BookBase = None
def __init__(self, uuid, BookBase):
self.uuid = uuid
self.BookBase = BookBase
def add(self, side):
if not self.quiet:
def remove(self, side):
if not self.quiet:
def modify(self, side):
if not self.quiet:
def display(self, side):
if self.verbose:
def diff(self):
if self.quiet:
# Synchronization of collections
collections = CollectionSet(server, client)
collections.synchronize()
collections.close()
# Synchroniz