summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-01-13 20:07:17 +0200
committerAlon Levy <alon@pobox.com>2015-01-13 20:07:17 +0200
commit8f88d7d7618d52bfeae5b9a51c06a5b91b545a71 (patch)
treeff4abf19e4e5252f5493c523ee653815e6be83ed /src
parent503b3fc960ed3af2f26fc98c667a94f1733b9098 (diff)
rz_cli_tool: fix after extraction; make run-local.sh friendlier
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--]src/local/rz_cli_tool.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/local/rz_cli_tool.py b/src/local/rz_cli_tool.py
index 93cc132a..6f5ab933 100644..100755
--- a/src/local/rz_cli_tool.py
+++ b/src/local/rz_cli_tool.py
@@ -1,9 +1,16 @@
+#!/bin/env python
+
import argparse
import os
import pickle
import re
+import sys
+
+# access to crypt_util & rz_server
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'server'))
+#import pdb; pdb.set_trace()
-import crypt_util
+from crypt_util import hash_pw
from rz_server import init_config
@@ -18,7 +25,7 @@ def init_pw_db(cfg, user_pw_list_file):
pw_db[u] = hash_pw(str(p), salt)
pickle.dump(pw_db, f)
- log.info('htpasswd db: added entry: user: %s, pw: %s...' % (u, pw_db[u][:5]))
+ print('htpasswd db: added entry: user: %s, pw: %s...' % (u, pw_db[u][:5]))
htpasswd_path = cfg.htpasswd_path