From e23ba7a17be61178ec58ed1db51d508810c62fe8 Mon Sep 17 00:00:00 2001 From: Huang Hao Date: Fri, 22 Feb 2013 18:29:59 +0800 Subject: [PATCH] Remove warnings of import statements of module util.misc * sys is useless * hashlib, sqlite are duplicated * avoid to import * of error and fs_related Change-Id: I926a906939f4f8f12acab6707df992a06f74061b --- mic/utils/misc.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mic/utils/misc.py b/mic/utils/misc.py index 30022c9..49275d4 100644 --- a/mic/utils/misc.py +++ b/mic/utils/misc.py @@ -16,7 +16,6 @@ # Temple Place - Suite 330, Boston, MA 02111-1307, USA. import os -import sys import time import tempfile import re @@ -26,8 +25,6 @@ import hashlib import subprocess import platform import rpmmisc -import hashlib -import sqlite3 as sqlite try: import sqlite3 as sqlite @@ -40,8 +37,8 @@ except ImportError: import cElementTree xmlparse = cElementTree.parse -from errors import * -from fs_related import * +from errors import CreatorError, SquashfsError +from fs_related import find_binary_path, makedirs from grabber import myurlgrab from proxy import get_proxy_for import runner @@ -289,7 +286,7 @@ def calc_hashes(file_path, hash_names, start = 0, end = None): end = os.path.getsize(file_path) chunk_size = 65536 - to_read = end - start; + to_read = end - start read = 0 hashes = [] -- 2.7.4