From 49fd2e6e564a0e01b4e121cdb24f53746db9b657 Mon Sep 17 00:00:00 2001
From: david-sarah <david-sarah@jacaranda.org>
Date: Sun, 30 Jan 2011 10:49:23 -0700
Subject: [PATCH] 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

---
 src/allmydata/scripts/common.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

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'." %
-- 
2.45.2