From: Daira Hopwood Date: Mon, 28 Dec 2015 20:01:07 +0000 (+0000) Subject: Aliases are Unicode. X-Git-Url: https://git.rkrishnan.org/pf?a=commitdiff_plain;h=46719a8bcfc478932adf2d5acd5aee0930a27bfd;p=tahoe-lafs%2Ftahoe-lafs.git Aliases are Unicode. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/scripts/tahoe_add_alias.py b/src/allmydata/scripts/tahoe_add_alias.py index f3ed15c4..30794429 100644 --- a/src/allmydata/scripts/tahoe_add_alias.py +++ b/src/allmydata/scripts/tahoe_add_alias.py @@ -1,6 +1,9 @@ import os.path import codecs + +from allmydata.util.assertutil import precondition + from allmydata import uri from allmydata.scripts.common_http import do_http, check_http_error from allmydata.scripts.common import get_aliases @@ -29,6 +32,7 @@ def add_line_to_aliasfile(aliasfile, alias, cap): def add_alias(options): nodedir = options['node-directory'] alias = options.alias + precondition(isinstance(alias, unicode), alias=alias) cap = options.cap stdout = options.stdout stderr = options.stderr @@ -56,6 +60,7 @@ def create_alias(options): # mkdir+add_alias nodedir = options['node-directory'] alias = options.alias + precondition(isinstance(alias, unicode), alias=alias) stdout = options.stdout stderr = options.stderr if u":" in alias: