Moved config class into separate file.

Moved Goodreads and LDAP services into separate package.
This commit is contained in:
Daniel Pavel
2019-07-07 16:05:51 +03:00
parent 499a66dfb0
commit 006e596c72
26 changed files with 1127 additions and 1229 deletions
+10
View File
@@ -43,3 +43,13 @@ def process_open(command, quotes=(), env=None, sout=subprocess.PIPE, serr=subpro
exc_command = [x for x in command]
return subprocess.Popen(exc_command, shell=False, stdout=sout, stderr=serr, universal_newlines=True, env=env)
def process_wait(command, serr=subprocess.PIPE):
'''Run command, wait for process to terminate, and return an iterator over lines of its output.'''
p = process_open(command, serr=serr)
p.wait()
for l in p.stdout.readlines():
if isinstance(l, bytes):
l = l.decode('utf-8')
yield l