Fix circular dependencies

This commit is contained in:
snegov committed 2019-12-05 15:58:11 +03:00
1 parent 107bb55082
commit c72727b9a0
5 files changed
+7 -8

No files matched your search

+1 -1
View File
@@ -1 +1 @@
from .client import SeafileClient
from .client import SeafileClient, start_seaf_daemon
+3 -4
View File
@@ -4,10 +4,9 @@ import time
import requests
from .consts import DEFAULT_USERNAME
from .misc import create_dir
DEFAULT_USERNAME = "seafile"
class SeafileClient:
def __init__(self, host: str, port: int, user: str, passwd: str):
@@ -72,11 +71,11 @@ class SeafileClient:
cur_status = self.get_status()
for folder, state in cur_status.items():
if state != prev_status.get(folder):
print(f"Synced folder {folder}: {state}")
print(f"Library {folder}:\t{state}")
prev_status[folder] = cur_status[folder]
def start_seaf_daemon():
cmd = 'seaf-cli start'
subprocess.run(['su', '-', DEFAULT_USERNAME, '-c', cmd])
time.sleep(5)
time.sleep(5)
+1
View File
@@ -0,0 +1 @@
DEFAULT_USERNAME = "seafile"
+1 -1
View File
@@ -2,7 +2,7 @@ import os
import pwd
import subprocess
from .client import DEFAULT_USERNAME
from .consts import DEFAULT_USERNAME
def setup_uid(uid: int, gid: int):