From ba13205bb60a7f770bae98aeadcc6afe3dc705ea Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 13 May 2017 19:20:21 +0300 Subject: [PATCH] Feat(Python3): exec statement -> exec() function --- robots.py | 6 +++--- storage.py | 6 +++--- writers.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/robots.py b/robots.py index 3efb8f0..77dc446 100644 --- a/robots.py +++ b/robots.py @@ -5,7 +5,7 @@ This file is a part of Bookmarks database and Internet robot. """ __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 1997-2014 PhiloSoft Design" +__copyright__ = "Copyright (C) 1997-2017 PhiloSoft Design" __license__ = "GNU GPL" __all__ = ['import_robot', 'robot'] @@ -17,8 +17,8 @@ from bkmk_objects import parse_params, set_params robot_name, robot_params = parse_params(environ.get("BKMK_ROBOT", "forking")) def import_robot(robot_name): - exec "from Robots import bkmk_r%s" % robot_name - exec "robot = bkmk_r%s.robot_%s" % (robot_name, robot_name) + exec("from Robots import bkmk_r%s" % robot_name) + exec("robot = bkmk_r%s.robot_%s" % (robot_name, robot_name)) return robot robot = import_robot(robot_name) diff --git a/storage.py b/storage.py index 9c806e4..7b6ca06 100644 --- a/storage.py +++ b/storage.py @@ -5,7 +5,7 @@ This file is a part of Bookmarks database and Internet robot. """ __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 1997-2014 PhiloSoft Design" +__copyright__ = "Copyright (C) 1997-2017 PhiloSoft Design" __license__ = "GNU GPL" __all__ = ['import_storage', 'storage'] @@ -17,8 +17,8 @@ from bkmk_objects import parse_params, set_params storage_name, storage_params = parse_params(environ.get("BKMK_STORAGE", "pickle")) def import_storage(storage_name): - exec "from Storage import bkmk_st%s" % storage_name - exec "storage = bkmk_st%s.storage_%s" % (storage_name, storage_name) + exec("from Storage import bkmk_st%s" % storage_name) + exec("storage = bkmk_st%s.storage_%s" % (storage_name, storage_name)) return storage storage = import_storage(storage_name) diff --git a/writers.py b/writers.py index 57d963c..952a232 100644 --- a/writers.py +++ b/writers.py @@ -5,7 +5,7 @@ This file is a part of Bookmarks database and Internet robot. """ __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 1997-2014 PhiloSoft Design" +__copyright__ = "Copyright (C) 1997-2017 PhiloSoft Design" __license__ = "GNU GPL" __all__ = ['import_writer', 'writer'] @@ -17,8 +17,8 @@ from bkmk_objects import parse_params, set_params writer_name, writer_params = parse_params(environ.get("BKMK_WRITER", "html")) def import_writer(writer_name): - exec "from Writers import bkmk_w%s" % writer_name - exec "writer = bkmk_w%s.writer_%s" % (writer_name, writer_name) + exec("from Writers import bkmk_w%s" % writer_name) + exec("writer = bkmk_w%s.writer_%s" % (writer_name, writer_name)) return writer writer = import_writer(writer_name) -- 2.39.5