소스 검색

Fix bug in get_or_create_password

oz123 10 년 전
부모
커밋
c48fd12625
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      pwman/ui/tools.py

+ 4 - 0
pwman/ui/tools.py

@@ -255,6 +255,10 @@ def getinput(question, default="", reader=raw_input,
 def get_or_create_pass():  # pragma: no cover
 
     p = getpass.getpass(prompt='Password (leave empty to create one):')
+
+    if p:
+        return p
+
     while not p:
         print("Password length (default: 8):", end="")
         sys.stdout.flush()