aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-03-01 17:03:39 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:52 +1200
commit33e3dee9e7eb88b2e39bfc1b08f49f399a54ae40 (patch)
tree3d3e4ae52ac404b432f2a2d4e671d5913213a6df
parentaad000734c8ae9bd1cca311469c62bae8a1aa1cd (diff)
downloadopenembedded-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.py6
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):