diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-03-01 17:03:39 +1300 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-05-04 23:57:52 +1200 |
commit | 33e3dee9e7eb88b2e39bfc1b08f49f399a54ae40 (patch) | |
tree | 3d3e4ae52ac404b432f2a2d4e671d5913213a6df | |
parent | aad000734c8ae9bd1cca311469c62bae8a1aa1cd (diff) | |
download | openembedded-core-contrib-33e3dee9e7eb88b2e39bfc1b08f49f399a54ae40.tar.gz |
rrs/tools/common.py: import sys/os at top
These are common enough that they should be imported up front.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r-- | rrs/tools/common.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/rrs/tools/common.py b/rrs/tools/common.py index b69b7016f3..5b720a1e46 100644 --- a/rrs/tools/common.py +++ b/rrs/tools/common.py @@ -5,6 +5,8 @@ # # Licensed under the MIT license, see COPYING.MIT for details +import sys +import os import logging class DryRunRollbackException(Exception): @@ -12,12 +14,10 @@ class DryRunRollbackException(Exception): def common_setup(): - import sys, os sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), '../../'))) sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), '../../layerindex'))) def get_logger(name, settings): - import os from logging.handlers import RotatingFileHandler logger = logging.getLogger(name) @@ -39,7 +39,6 @@ def get_logger(name, settings): return logger def update_repo(fetchdir, repo_name, repo_url, pull, logger): - import os from layerindex import utils, recipeparse path = os.path.join(fetchdir, repo_name) @@ -69,7 +68,6 @@ def get_pv_type(pv): def get_recipe_files(layerdir): from layerindex import recipeparse - import os sublayer_dirs = [] for root, dirs, files in os.walk(layerdir): |