[sysadmin-bin] No need for an extra else statement



commit 609d1cea90e05a8360c883b4937e6ebdef960d6f
Author: Andrea Veri <av gnome org>
Date:   Sat Oct 31 19:14:41 2015 +0100

    No need for an extra else statement

 cleanup-inactive-ldap-accounts.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/cleanup-inactive-ldap-accounts.py b/cleanup-inactive-ldap-accounts.py
index f7f5967..926d08a 100755
--- a/cleanup-inactive-ldap-accounts.py
+++ b/cleanup-inactive-ldap-accounts.py
@@ -108,12 +108,12 @@ def add_remove_comment_to_user(username, group):
 
     try:
         current_comment = results[0][1]['description'][0]
+
+        has_description = True
     except KeyError:
         has_description = False
-        
+
         current_comment = ''
-    else:
-        has_description = True
 
     comment = '%s %s' % (current_comment, new_comment)
 


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