Moved config class into separate file.
Moved Goodreads and LDAP services into separate package.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user