Skip to content

Commit

Permalink
fix(dmg-builder): the "import" unbound issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pan93412 authored Feb 24, 2022
1 parent e1a439b commit dbe8bc0
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions packages/dmg-builder/vendor/dmgbuild/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
import os
import re
import sys

if sys.version_info.major == 3:
try:
from importlib import reload
except ImportError:
from imp import reload
reload(sys) # Reload is a hack
sys.setdefaultencoding('UTF8')
try:
from importlib import reload
except ImportError:
from imp import reload
reload(sys) # To workaround the unbound issue
else:
reload(sys) # Reload is a hack
sys.setdefaultencoding('UTF8')

sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

Expand Down Expand Up @@ -284,4 +287,4 @@ def build_dmg():
except:
raise

build_dmg()
build_dmg()

0 comments on commit dbe8bc0

Please sign in to comment.