[jhbuild] cvs: don't write empty passwords to ~/.cvspass



commit 47091fd9b39f11564f32cc53a6355f3a3a940758
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Feb 21 15:00:07 2015 -0500

    cvs: don't write empty passwords to ~/.cvspass
    
    If we encounter a password="" for a cvs repository in a moduleset, don't
    bother writing the empty password to ~/.cvspass.
    
    cvs runs just fine without it.

 jhbuild/versioncontrol/cvs.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/versioncontrol/cvs.py b/jhbuild/versioncontrol/cvs.py
index fc83927..f8bab01 100644
--- a/jhbuild/versioncontrol/cvs.py
+++ b/jhbuild/versioncontrol/cvs.py
@@ -77,6 +77,10 @@ def login(cvsroot, password=None):
     cvsroot = _canonicalise_cvsroot(cvsroot)
     cvspass = os.path.join(os.environ['HOME'], '.cvspass')
 
+    # cvs won't ask for this, so don't write it
+    if password == '':
+        return
+
     # check if the password has already been entered:
     try:
         fp = open(cvspass, 'r')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]