diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-11-19 22:44:24 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-11-19 22:44:24 +0100 |
commit | 3b9885e40961bde996014c7e82d59daf2bd7ac14 (patch) | |
tree | 54f60f42b9b445d8b497d373a9d16eefd262ce87 /module/Api.py | |
parent | catch real debrid error, when ip is blocked (diff) | |
download | pyload-3b9885e40961bde996014c7e82d59daf2bd7ac14.tar.xz |
disableble thriftbackend
Diffstat (limited to 'module/Api.py')
-rw-r--r-- | module/Api.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/module/Api.py b/module/Api.py index 11072b2cd..ba79a31ef 100644 --- a/module/Api.py +++ b/module/Api.py @@ -22,14 +22,18 @@ from os.path import join from time import time import re -from remote.thriftbackend.thriftgen.pyload.ttypes import * -from remote.thriftbackend.thriftgen.pyload.Pyload import Iface - from PyFile import PyFile from utils import freeSpace, compare_time from common.packagetools import parseNames from network.RequestFactory import getURL - +from remote import activated + +if activated: + from remote.thriftbackend.thriftgen.pyload.ttypes import * + from remote.thriftbackend.thriftgen.pyload.Pyload import Iface + BaseObject = TBase +else: + from remote.socketbackend.ttypes import * # contains function names mapped to their permissions # unlisted functions are for admins only |