From 1b6a8909c9e8786a4ad3218ac16193b9272730a2 Mon Sep 17 00:00:00 2001 From: Lingchao Xin Date: Tue, 17 Dec 2013 17:11:12 +0800 Subject: [PATCH] Keep a consistent import style Change-Id: Id3380abbe538abc8736933de78d7dd2808e2ea31 --- snapdiff/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snapdiff/__init__.py b/snapdiff/__init__.py index 6d21ab0..5395bfe 100644 --- a/snapdiff/__init__.py +++ b/snapdiff/__init__.py @@ -26,6 +26,8 @@ __title__ = 'python-snapdiff' __version__ = '0.1' import json +import os +import shutil from .image import ks_diff, packages from .render import output_html @@ -133,14 +135,12 @@ def diff_to_HTML(old_url, new_url, style='repo'): def diff_to_dist(old_url, new_url, dist_path): """create a dist-dir of diffs, contains html and css""" - import os static_dir = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'static') output_html = diff_to_HTML(old_url, new_url) if not os.path.exists(dist_path): os.makedirs(dist_path) - import shutil for root, dirs, files in os.walk(static_dir): for filename in files: -- 2.34.1