mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-12 02:38:20 +00:00
Fix syncfiles for el7
This commit is contained in:
parent
45cc4b7788
commit
affbbcc89b
@ -4,11 +4,17 @@ import tempfile
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
from importlib.machinery import SourceFileLoader
|
||||
try:
|
||||
apiclient = SourceFileLoader('apiclient', '/opt/confluent/bin/apiclient').load_module()
|
||||
except FileNotFoundError:
|
||||
apiclient = SourceFileLoader('apiclient', '/etc/confluent/apiclient').load_module()
|
||||
from importlib.machinery import SourceFileLoader
|
||||
def load_source(mod, path):
|
||||
return SourceFileLoader(mod, path).load_module()
|
||||
except ImportError:
|
||||
from imp import load_source
|
||||
|
||||
try:
|
||||
apiclient = load_source('apiclient', '/opt/confluent/bin/apiclient')
|
||||
except IOError:
|
||||
apiclient = load_source('apiclient', '/etc/confluent/apiclient')
|
||||
|
||||
|
||||
def partitionhostsline(line):
|
||||
@ -216,4 +222,4 @@ def synchronize():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
synchronize()
|
||||
synchronize()
|
||||
|
Loading…
x
Reference in New Issue
Block a user