diff options
Diffstat (limited to 'render_renderfarmfi')
-rw-r--r-- | render_renderfarmfi/rpc.py | 10 | ||||
-rw-r--r-- | render_renderfarmfi/utils.py | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/render_renderfarmfi/rpc.py b/render_renderfarmfi/rpc.py index bb5d6a45..22c06e43 100644 --- a/render_renderfarmfi/rpc.py +++ b/render_renderfarmfi/rpc.py @@ -17,7 +17,7 @@ # ##### END GPL LICENSE BLOCK ##### import xmlrpc.client -import imp +import importlib import time import bpy @@ -31,9 +31,9 @@ def _is_dev(): pwfile = bpy.utils.user_resource('CONFIG', 'rffi', True) pwmod = None try: - pwmod = imp.find_module('rffi_dev',[pwfile]) + pwmod = implib.find_module('rffi_dev',[pwfile]) try: - user_creds = imp.load_module('rffi_dev', pwmod[0], pwmod[1], pwmod[2]) + user_creds = implib.load_module('rffi_dev', pwmod[0], pwmod[1], pwmod[2]) if 'dev' in dir(user_creds) and user_creds.dev: is_dev = True except ImportError: @@ -52,9 +52,9 @@ def _be_verbose(): pwfile = bpy.utils.user_resource('CONFIG', 'rffi', True) pwmod = None try: - pwmod = imp.find_module('rffi_dev',[pwfile]) + pwmod = implib.find_module('rffi_dev',[pwfile]) try: - user_creds = imp.load_module('rffi_dev', pwmod[0], pwmod[1], pwmod[2]) + user_creds = implib.load_module('rffi_dev', pwmod[0], pwmod[1], pwmod[2]) if 'verbose' in dir(user_creds) and user_creds.verbose: be_verbose = True except ImportError: diff --git a/render_renderfarmfi/utils.py b/render_renderfarmfi/utils.py index 8afcfd78..50e18cfd 100644 --- a/render_renderfarmfi/utils.py +++ b/render_renderfarmfi/utils.py @@ -16,7 +16,7 @@ # # ##### END GPL LICENSE BLOCK ##### -import imp +import importlib from os.path import join @@ -37,12 +37,12 @@ def _read_credentials(): pwfile = bpy.utils.user_resource('CONFIG', 'rffi', True) try: - pwmod = imp.find_module('rffi_credentials',[pwfile]) + pwmod = implib.find_module('rffi_credentials',[pwfile]) except ImportError: _write_credentials('', '') - pwmod = imp.find_module('rffi_credentials',[pwfile]) + pwmod = implib.find_module('rffi_credentials',[pwfile]) try: - user_creds = imp.load_module('rffi_credentials', pwmod[0], pwmod[1], pwmod[2]) + user_creds = implib.load_module('rffi_credentials', pwmod[0], pwmod[1], pwmod[2]) bpy.rffi_user = user_creds.user bpy.rffi_hash = user_creds.hash bpy.rffi_creds_found = True @@ -50,9 +50,9 @@ def _read_credentials(): # doesn't exist yet, write template _write_credentials('', '') pwfile = bpy.utils.user_resource('CONFIG', 'rffi', True) - pwmod = imp.find_module('rffi_credentials',[pwfile]) + pwmod = implib.find_module('rffi_credentials',[pwfile]) try: - user_creds = imp.load_module('rffi_credentials', pwmod[0], pwmod[1], pwmod[2]) + user_creds = implib.load_module('rffi_credentials', pwmod[0], pwmod[1], pwmod[2]) bpy.rffi_user = user_creds.user bpy.rffi_hash = user_creds.hash bpy.rffi_creds_found = True |