Merge pull request #3377 from shin-/3372-windowserror

Define WindowsError on non-win32 platforms
This commit is contained in:
Daniel Nephin 2016-04-28 10:33:18 -04:00
commit 61794ba97c
1 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,13 @@ from six.moves import input
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):
"""