Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8498F1149D for ; Thu, 19 Jun 2014 04:17:16 +0000 (UTC) Received: (qmail 14295 invoked by uid 500); 19 Jun 2014 04:17:16 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 14163 invoked by uid 500); 19 Jun 2014 04:17:16 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 13994 invoked by uid 99); 19 Jun 2014 04:17:15 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jun 2014 04:17:15 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B23ED983529; Thu, 19 Jun 2014 04:17:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mishail@apache.org To: commits@cassandra.apache.org Date: Thu, 19 Jun 2014 04:17:17 -0000 Message-Id: In-Reply-To: <84ff623aa1b547c2859ca2b00a7034c9@git.apache.org> References: <84ff623aa1b547c2859ca2b00a7034c9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/10] git commit: cqlsh: ignore .cassandra permission errors cqlsh: ignore .cassandra permission errors patch by Mihai Suteu; reviewed by Mikhail Stepura for CASSANDRA-7266 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b25ddd8a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b25ddd8a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b25ddd8a Branch: refs/heads/cassandra-2.1 Commit: b25ddd8a7f470fbe2e34f6a16549c03e093ea1f9 Parents: 6131273 Author: Mihai Suteu Authored: Thu Jun 19 15:14:54 2014 +1100 Committer: Mikhail Stepura Committed: Thu Jun 19 15:14:54 2014 +1100 ---------------------------------------------------------------------- CHANGES.txt | 1 + bin/cqlsh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b25ddd8a/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index a645516..8da8258 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2.17 + * cqlsh: ignore .cassandra permission errors (CASSANDRA-7266) * Errors in FlushRunnable may leave threads hung (CASSANDRA-7275) * reduce failure detector initial value to 2s (CASSANDRA-7307) * Fix problem truncating on a node that was previously in a dead state (CASSANDRA-7318) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b25ddd8a/bin/cqlsh ---------------------------------------------------------------------- diff --git a/bin/cqlsh b/bin/cqlsh index 24cb3b8..cec9aac 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -122,7 +122,10 @@ HISTORY_DIR = os.path.expanduser(os.path.join('~', '.cassandra')) CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc') HISTORY = os.path.join(HISTORY_DIR, 'cqlsh_history') if not os.path.exists(HISTORY_DIR): - os.mkdir(HISTORY_DIR) + try: + os.mkdir(HISTORY_DIR) + except OSError: + print '\nWarning: Cannot create directory at `%s`. Command history will not be saved.\n' % HISTORY_DIR OLD_CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc')) if os.path.exists(OLD_CONFIG_FILE):