diff --git a/plugins/solr/index.py b/plugins/solr/index.py index 8eab399f4..0538fa4a6 100755 --- a/plugins/solr/index.py +++ b/plugins/solr/index.py @@ -312,34 +312,34 @@ def scriptIncr(): if __name__ == "__main__": func = sys.argv[1] if func == 'status': - print status() + print(status()) elif func == 'start': - print start() + print(start()) elif func == 'stop': - print stop() + print(stop()) elif func == 'restart': - print restart() + print(restart()) elif func == 'reload': - print reload() + print(reload()) elif func == 'initd_status': - print initdStatus() + print(initdStatus()) elif func == 'initd_install': - print initdInstall() + print(initdInstall()) elif func == 'initd_uninstall': - print initdUinstall() + print(initdUinstall()) elif func == 'run_log': - print getLog() + print(getLog()) elif func == 'collection_list': - print collectionList() + print(collectionList()) elif func == 'add_collection': - print addCollection() + print(addCollection()) elif func == 'remove_collection': - print removeCollection() + print(removeCollection()) elif func == 'conf_file_collection': - print confFileCollection() + print(confFileCollection()) elif func == 'script_full': - print scriptFull() + print(scriptFull()) elif func == 'script_incr': - print scriptIncr() + print(scriptIncr()) else: print 'error' diff --git a/task.py b/task.py index f98f22fc9..62ba5f4ef 100755 --- a/task.py +++ b/task.py @@ -80,9 +80,9 @@ def execShell(cmdstring, cwd=None, timeout=None, shell=True): if timeout: end_time = datetime.datetime.now() + datetime.timedelta(seconds=timeout) - sub = subprocess.Popen(cmdstring + ' > ' + logPath + ' 2>&1', - cwd=cwd, stdin=subprocess.PIPE, shell=shell, bufsize=4096) - + cmd = cmdstring + ' > ' + logPath + ' 2>&1' + sub = subprocess.Popen( + cmd, cwd=cwd, stdin=subprocess.PIPE, shell=shell, bufsize=4096) while sub.poll() is None: time.sleep(0.1)