fix: pipe uncompressed database to file
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import subprocess
|
||||
|
||||
|
||||
def run_command(command):
|
||||
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
def run_command(command, stdout=None, stderr=None):
|
||||
stdout = stdout or subprocess.PIPE
|
||||
stderr = stderr or subprocess.PIPE
|
||||
process = subprocess.Popen(command, stdout=stdout, stderr=stderr)
|
||||
out, error = process.communicate()
|
||||
if process.returncode:
|
||||
print("Something went wrong:")
|
||||
|
||||
Reference in New Issue
Block a user