From: david-sarah Date: Sun, 30 Jan 2011 17:49:23 +0000 (-0700) Subject: scripts/common.py: don't assume that the default alias is always 'tahoe' (it is,... X-Git-Url: https://git.rkrishnan.org/frontends/banana.xhtml?a=commitdiff_plain;h=49fd2e6e564a0e01b4e121cdb24f53746db9b657;p=tahoe-lafs%2Ftahoe-lafs.git scripts/common.py: don't assume that the default alias is always 'tahoe' (it is, but the API of get_alias doesn't say so). refs #1342 --- diff --git a/src/allmydata/scripts/common.py b/src/allmydata/scripts/common.py index 1391cea2..ac5432b3 100644 --- a/src/allmydata/scripts/common.py +++ b/src/allmydata/scripts/common.py @@ -165,9 +165,9 @@ def get_alias(aliases, path_unicode, default): if default == None: return DefaultAliasMarker, path if default not in aliases: - raise UnknownAliasError("No alias specified, and the default " - "'tahoe' alias doesn't exist. To create " - "it, use 'tahoe create-alias tahoe'.") + raise UnknownAliasError("No alias specified, and the default %s alias doesn't exist. " + "To create it, use 'tahoe create-alias %s'." + % (quote_output(default), quote_output(default, quotemarks=False))) return aliases[default], path if colon == 1 and default is None and platform_uses_lettercolon_drivename(): # treat C:\why\must\windows\be\so\weird as a local path, not a tahoe @@ -182,9 +182,9 @@ def get_alias(aliases, path_unicode, default): if default == None: return DefaultAliasMarker, path if default not in aliases: - raise UnknownAliasError("No alias specified, and the default " - "'tahoe' alias doesn't exist. To create " - "it, use 'tahoe create-alias tahoe'.") + raise UnknownAliasError("No alias specified, and the default %s alias doesn't exist. " + "To create it, use 'tahoe create-alias %s'." + % (quote_output(default), quote_output(default, quotemarks=False))) return aliases[default], path if alias not in aliases: raise UnknownAliasError("Unknown alias %s, please create it with 'tahoe add-alias' or 'tahoe create-alias'." %