[sysadmin-bin] Fix typo and indentation
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Fix typo and indentation
- Date: Sat, 3 May 2014 17:32:55 +0000 (UTC)
commit 5c7005a83a8027379756d86ccb9d6d786fd56ad1
Author: Andrea Veri <av gnome org>
Date: Sat May 3 19:32:50 2014 +0200
Fix typo and indentation
membership/foundation-db-operations.py | 34 ++++++++++++++++----------------
1 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/membership/foundation-db-operations.py b/membership/foundation-db-operations.py
index 2c396e8..e6253bc 100755
--- a/membership/foundation-db-operations.py
+++ b/membership/foundation-db-operations.py
@@ -38,11 +38,11 @@ parser.add_option("--six-months",
action="store_true", default=False,
help="Generates a list of the members with their membership going "
"to expire in 6 months from today")
-pparser.add_option("--remove-old-foundation-members",
+parser.add_option("--remove-old-foundation-members",
action="store_true", default=False,
help="Remove old entries from the Foundation database in the case "
"an old member did not renew the membership for at least two years")
-arser.add_option("--automatic-subscriptions",
+parser.add_option("--automatic-subscriptions",
action="store_true", default=False,
help="Automatically subscribes new Foundation members to the foundation-announce "
"mailing list. To be executed on smtp.gnome.org")
@@ -120,24 +120,24 @@ def main():
file = open('/home/admin/secret/ldap','r')
lines = file.readlines()
- for line in lines:
- if line.find("ldap_password") > -1:
- dirty_password = line.split()
- ldap_password = str(dirty_password)
+ for line in lines:
+ if line.find("ldap_password") > -1:
+ dirty_password = line.split()
+ ldap_password = str(dirty_password)
- sanitize_file=["ldap_password","=","\"","'","[","]"]
- for i in range(len(sanitize_file)):
- ldap_password = ldap_passwordreplace(sanitize_file[i],"")
- file.close()
+ sanitize_file=["ldap_password","=","\"","'","[","]"]
+ for i in range(len(sanitize_file)):
+ ldap_password = ldap_passwordreplace(sanitize_file[i],"")
+ file.close()
- try:
- l = ldap.open('ldap.gnome.org')
- l.simple_bind("cn=Manager,dc=gnome,dc=org", ldap_password)
- except ldap.LDAPError, e:
- print >>sys.stderr, e
- sys.exit(1)
+ try:
+ l = ldap.open('ldap.gnome.org')
+ l.simple_bind("cn=Manager,dc=gnome,dc=org", ldap_password)
+ except ldap.LDAPError, e:
+ print >>sys.stderr, e
+ sys.exit(1)
- sync_foundation_db_with_ldap()
+ sync_foundation_db_with_ldap()
if options.remove_old_foundation_members:
remove_old_foundation_members()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]