Define WindowsError on non-win32 platforms

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2016-04-25 17:58:20 -07:00
parent 0cd35913c3
commit d3e645488a
1 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,13 @@ from six.moves import input
import compose import compose
# WindowsError is not defined on non-win32 platforms. Avoid runtime errors by
# defining it as OSError (its parent class) if missing.
try:
WindowsError
except NameError:
WindowsError = OSError
def yesno(prompt, default=None): def yesno(prompt, default=None):
""" """