Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
d703bd2b
Commit
d703bd2b
authored
Sep 25, 2004
by
Chris Withers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #1473: zpasswd.py can now accept --username without --password
parent
94dffd34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
utilities/zpasswd.py
utilities/zpasswd.py
+14
-11
No files found.
doc/CHANGES.txt
View file @
d703bd2b
...
...
@@ -156,6 +156,9 @@ Zope Changes
is now installed into the 'bin' folder.
Bugs fixed
- Collector #1473: zpasswd.py can now accept --username
without --password
- Collector #1491: talgettext.py did not create a proper header
for the generated .pot file if multiple pagetemplate files
...
...
utilities/zpasswd.py
View file @
d703bd2b
...
...
@@ -99,6 +99,16 @@ def write_access(home, user='', group=''):
import
do
;
do
.
ch
(
ac_path
,
user
,
group
)
def
get_password
():
while
1
:
password
=
getpass
.
getpass
(
"Password: "
)
verify
=
getpass
.
getpass
(
"Verify password: "
)
if
verify
==
password
:
return
password
else
:
password
=
verify
=
''
print
"Password mismatch, please try again..."
def
write_inituser
(
home
,
user
=
''
,
group
=
''
):
ac_path
=
os
.
path
.
join
(
home
,
'inituser'
)
if
not
os
.
path
.
exists
(
ac_path
):
...
...
@@ -163,8 +173,8 @@ def main():
if
opts
:
# There were some command line args, so verify
if
username
is
None
or
password
is
None
:
usage
(
1
,
'-u and -p are required'
)
if
username
is
not
None
and
password
is
None
:
password
=
get_password
(
)
else
:
# No command line args, so prompt
while
1
:
...
...
@@ -172,15 +182,8 @@ def main():
if
username
!=
''
:
break
while
1
:
password
=
getpass
.
getpass
(
"Password: "
)
verify
=
getpass
.
getpass
(
"Verify password: "
)
if
verify
==
password
:
break
else
:
password
=
verify
=
''
print
"Password mismatch, please try again..."
password
=
get_password
()
while
1
:
print
"""
Please choose a format from:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment