Commit b636f637 authored by katharina.berger's avatar katharina.berger

add missing

parent d45cd67e
from subprocess import Popen, PIPE
def run_esgunpublish(project, dataset_id, esgunpublish_logfile, dry_run):
cmd = 'esgunpublish --project %s --delete %s' % (project, dataset_id)
if not dry_run:
proc = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
stdout, stderr = proc.communicate()
if stdout:
try:
esgunpublish_logfile.write('============ STDOUT ============')
esgunpublish_logfile.write('\n%s\n' % str(stdout))
except:
print stdout
if stderr:
try:
esgunpublish_logfile.write('============ STDERR ============')
esgunpublish_logfile.write('\n%s\n' % str(stderr))
except:
print stderr
else:
print cmd
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment