Refactor acloud.public.errors to acloud.errors.
Bug: 113753798
Test: atest acloud_test && run acloud create/list/delete
Change-Id: I03b4b34769d754bfebd279895b0ca44311bbecc7
diff --git a/internal/lib/utils.py b/internal/lib/utils.py
index 418d14b..b044d38 100755
--- a/internal/lib/utils.py
+++ b/internal/lib/utils.py
@@ -36,9 +36,8 @@
import uuid
import zipfile
-from acloud import errors as root_errors
+from acloud import errors
from acloud.internal import constants
-from acloud.public import errors
logger = logging.getLogger(__name__)
@@ -454,7 +453,7 @@
with zipfile.ZipFile(sourcefile, 'r') as compressor:
compressor.extractall(dest_path)
else:
- raise root_errors.UnsupportedCompressionFileType(
+ raise errors.UnsupportedCompressionFileType(
"Sorry, we could only support compression file type "
"for zip or tar.gz.")
@@ -764,7 +763,7 @@
"""
bin_path = find_executable(cmd)
if not bin_path:
- raise root_errors.NoExecuteCmd("unable to locate %s" % cmd)
+ raise errors.NoExecuteCmd("unable to locate %s" % cmd)
command = [bin_path] + args
logger.debug("Running '%s'", ' '.join(command))
with open(os.devnull, "w") as dev_null: