From 547bf8838445c6faf2686b63fd7f89a31aaddf06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schell?= Date: Tue, 12 Apr 2022 13:48:21 +0200 Subject: [PATCH] =?UTF-8?q?[#1401]=20=F0=9F=90=9B=20Fix=20python3=20incomp?= =?UTF-8?q?atibilities=20in=20module=20manipulation=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framework/pym/play/commands/modulesrepo.py | 2 +- resources/module-skel/commands.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/pym/play/commands/modulesrepo.py b/framework/pym/play/commands/modulesrepo.py index c05dbd125d..d76681cc42 100644 --- a/framework/pym/play/commands/modulesrepo.py +++ b/framework/pym/play/commands/modulesrepo.py @@ -239,7 +239,7 @@ def new(app, args, play_env): replaceAll(os.path.join(app.path, 'conf/messages'), r'%MODULE%', application_name) replaceAll(os.path.join(app.path, 'conf/dependencies.yml'), r'%MODULE%', application_name) replaceAll(os.path.join(app.path, 'conf/routes'), r'%MODULE%', application_name) - replaceAll(os.path.join(app.path, 'conf/routes'), r'%MODULE_LOWERCASE%', string.lower(application_name)) + replaceAll(os.path.join(app.path, 'conf/routes'), r'%MODULE_LOWERCASE%', application_name.lower()) os.mkdir(os.path.join(app.path, 'app')) os.mkdir(os.path.join(app.path, 'app/controllers')) os.mkdir(os.path.join(app.path, 'app/controllers/%s' % application_name)) diff --git a/resources/module-skel/commands.py b/resources/module-skel/commands.py index 4e52a37288..8635fb2c2f 100644 --- a/resources/module-skel/commands.py +++ b/resources/module-skel/commands.py @@ -13,7 +13,7 @@ def execute(**kargs): env = kargs.get("env") if command == "%MODULE%:hello": - print "~ Hello" + print("~ Hello") # This will be executed before any command (new, run...)