From 66d075175741794d9304d6efdb81f9faf80167eb Mon Sep 17 00:00:00 2001 From: Julen Landa Alustiza Date: Tue, 27 Apr 2021 09:24:46 +0200 Subject: [PATCH] poc unicode literals --- inventories/script_migrations/script_source.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inventories/script_migrations/script_source.py b/inventories/script_migrations/script_source.py index be87da708e..b8e0b977b0 100755 --- a/inventories/script_migrations/script_source.py +++ b/inventories/script_migrations/script_source.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import unicode_literals + import json import random import string @@ -12,7 +14,7 @@ def random_str(non_ascii=True): char_list = string.ascii_letters if non_ascii: - char_list += (u"읤僪䠱빨胀콩厺殜赬镗צּ䂕ᆑ䭆蜅펵ꂢ綌靸縹聂傈㟩륯Ȳ北벊렙ぶ逖ϥ谺艣뒉摳") + char_list += ("읤僪䠱빨胀콩厺殜赬镗צּ䂕ᆑ䭆蜅펵ꂢ綌靸縹聂傈㟩륯Ȳ北벊렙ぶ逖ϥ谺艣뒉摳") return "".join([random.choice(char_list) for _ in range(10)])