Make all Python pass pyflakes

This found one bug, but will also help us with Jenkins testing of these scripts

Change-Id: Iabe171645c06f769957db7cf0def1d10a0e47988
This commit is contained in:
Andrew Hutchings 2012-05-25 14:26:41 +01:00
parent 617b8d7969
commit 16a6c46139
6 changed files with 6 additions and 14 deletions

View File

@ -29,7 +29,6 @@
import github2.client
import os
import StringIO
import ConfigParser
import logging
import re

View File

@ -18,7 +18,6 @@
# 1. if open and no activity in 2 weeks, expire
# 2. if negative comment and no activity in 1 week, expire
import os
import paramiko
import json
import logging

View File

@ -20,16 +20,13 @@
# remote = https://gerrit.googlesource.com/gerrit
import ConfigParser
import StringIO
import logging
import os
import re
import subprocess
import shlex
def run_command(cmd, status=False, env={}):
if VERBOSE:
print datetime.datetime.now(), "Running:", cmd
cmd_list = shlex.split(str(cmd))
newenv = os.environ
newenv.update(env)

View File

@ -15,16 +15,10 @@
# Add launchpad ids listed in the wiki CLA page to the CLA group in LP.
import os
import sys
import uuid
import os
import urllib
import re
import StringIO
import ConfigParser
from launchpadlib.launchpad import Launchpad
from launchpadlib.uris import LPNET_SERVICE_ROOT

View File

@ -19,7 +19,6 @@ import os
import sys
import fcntl
import uuid
import os
import subprocess
from datetime import datetime
@ -42,6 +41,9 @@ from openid.cryptutil import randomString
DEBUG = False
# suppress pyflakes
pkg_resources.get_supported_platform()
pid_file = '/tmp/update_gerrit_users.pid'
fp = open(pid_file, 'w')
try:

View File

@ -19,6 +19,7 @@
# 2. split out the two classes into separate files to be used as a library
import os
import sys
import ConfigParser
import StringIO
import paramiko
@ -301,7 +302,7 @@ class GerritAction(object):
user_ssh_keys= ["%s %s %s" % ('ssh-%s' % key.keytype.lower(), key.keytext, key.comment) for key in user_data.sshkeys]
user_email= None
try:
email = user_data.preferred_email_address.email
user_email = user_data.preferred_email_address.email
except ValueError:
pass
query= "insert into account_id (s) values (NULL)"