
import sys
import os

PY3 = sys.version_info[0] >= 3
if PY3:
    text_type = str
    binary_type = bytes
    environb = os.environb
else:
    text_type = unicode
    binary_type = str
    environb = os.environ


import sys
import os

PY3 = sys.version_info[0] >= 3
if PY3:
    text_type = str
    binary_type = bytes
    if os.supports_bytes_environ:
        # environb will be unset under Windows, but then again we're not supposed to use it.
        environb = os.environb
else:
    text_type = unicode
    binary_type = str
    environb = os.environ

Fix newly-introduced crash under Windows
Fix newly-introduced crash under Windows

ref #14

  
  import sys
  import os
  
  PY3 = sys.version_info[0] >= 3
  if PY3:
      text_type = str
      binary_type = bytes
+     if os.supports_bytes_environ:
+         # environb will be unset under Windows, but then again we're not supposed to use it.
-     environb = os.environb
+         environb = os.environb
  else:
      text_type = unicode
      binary_type = str
      environb = os.environ
  
Fix newly-introduced crash under Windows
## Code Before:

import sys
import os

PY3 = sys.version_info[0] >= 3
if PY3:
    text_type = str
    binary_type = bytes
    environb = os.environb
else:
    text_type = unicode
    binary_type = str
    environb = os.environ

## Instruction:
Fix newly-introduced crash under Windows
## Code After:

import sys
import os

PY3 = sys.version_info[0] >= 3
if PY3:
    text_type = str
    binary_type = bytes
    if os.supports_bytes_environ:
        # environb will be unset under Windows, but then again we're not supposed to use it.
        environb = os.environb
else:
    text_type = unicode
    binary_type = str
    environb = os.environ
