imgconverter.py: really close stdout in get_through_dvm

This commit is contained in:
Wojciech Zygmunt Porczyk 2014-05-27 14:25:33 +02:00
parent e18bfc5dad
commit affc4fd3a9

View File

@ -25,7 +25,7 @@ Toolkit for secure transfer and conversion of images between Qubes VMs.'''
import colorsys
import math
import os.path
import os
import re
import cStringIO as StringIO
import subprocess
@ -185,6 +185,8 @@ expects header+RGBA on stdin. This method is invoked from qvm-imgconverter-clien
raise Exception('Something went wrong: {0!s}'.format(e))
finally:
sys.stdout.close()
# sys.stdout.close() is not enough and documentation is silent about this
os.close(1)
return cls.get_from_stream(sys.stdin, **kwargs)