-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsync_config.py
50 lines (36 loc) · 1.12 KB
/
sync_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# coding: utf-8
# This file is part of https://github.com/marcus67/gitsynchista
import config
import client
import six
if six.PY3:
from importlib import reload
reload(config)
reload(client)
PASSWORD_USE_KEY_CHAIN = 'USE_KEY_CHAIN'
class WebDavConfig(config.BaseConfig):
def __init__(self):
self.server = 'localhost'
self.port = 8080
self.auth_mode = client.AUTH_MODE_DIGEST
self.username = None
self.password = PASSWORD_USE_KEY_CHAIN
self.epoch_delta = 3600
def getIntAttributes(self):
return ('port', 'epoch_delta')
class RepositoryConfig(config.BaseConfig):
def __init__(self):
self.name = None
self.local_path = None
self.remote_path = None
self.transfer_to_remote = True
self.transfer_to_local = True
self.auto_scan = False
self.auto_open_app = None
self.working_copy_wakeup = False
def getBooleanAttributes(self):
return ('transfer_to_remote', 'transfer_to_local', 'auto_scan', 'working_copy_wakeup')
class SyncConfig(config.BaseConfig):
def __init__(self):
self.webdav = WebDavConfig()
self.repository = RepositoryConfig()