Skip to content

Commit

Permalink
Replace module imp with importlib (#1738)
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Burati authored Apr 24, 2020
1 parent 62227d6 commit 11d0881
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bin/waagent
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
#

import os
import imp
import sys

if sys.version_info[0] == 2:
import imp
else:
import importlib

if __name__ == '__main__' :
import azurelinuxagent.agent as agent
"""
Expand Down
6 changes: 5 additions & 1 deletion bin/waagent2.0
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,11 @@ bsd_activate_resource_disk_txt="""\
import os
import sys
import imp
if sys.version_info[0] == 2:
import imp
else:
import importlib
# waagent has no '.py' therefore create waagent module import manually.
__name__='setupmain' #prevent waagent.__main__ from executing
Expand Down

0 comments on commit 11d0881

Please sign in to comment.