You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mi...@apache.org on 2014/06/19 06:17:18 UTC
[04/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/trunk
Commit: b25ddd8a7f470fbe2e34f6a16549c03e093ea1f9
Parents: 6131273
Author: Mihai Suteu <mi...@intheforest.co.jp>
Authored: Thu Jun 19 15:14:54 2014 +1100
Committer: Mikhail Stepura <mi...@apache.org>
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):