Commits

Michał Górny committed 2f81c1c

Fix py3 compat in module loading fallback.

  • Participants
  • Parent commits 5949192

Comments (0)

Files changed (1)

File smart-live-rebuild

 	sys.path.insert(0, os.path.dirname(sys.argv[0]))
 	# Ensure a clean reload from the new location.
 	if 'SmartLiveRebuild' in sys.modules:
+		try: # py3 compat
+			from imp import reload
+		except ImportError:
+			pass
+
 		reload(sys.modules['SmartLiveRebuild'])
 		del sys.modules['SmartLiveRebuild']
 	from SmartLiveRebuild.cli import main