brintos

brintos / linux-shallow public Read only

0
0
Text · 354 B · b1780b9 Raw
16 lines · python
1# SPDX-License-Identifier: GPL-2.02 3import os4import importlib5 6_modules = {}7 8def Remote(kind, args, src_path):9    global _modules10 11    if kind not in _modules:12        _modules[kind] = importlib.import_module("..remote_" + kind, __name__)13 14    dir_path = os.path.abspath(src_path + "/../")15    return getattr(_modules[kind], "Remote")(args, dir_path)16