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:
@@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
import github2.client
|
import github2.client
|
||||||
import os
|
import os
|
||||||
import StringIO
|
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
# 1. if open and no activity in 2 weeks, expire
|
# 1. if open and no activity in 2 weeks, expire
|
||||||
# 2. if negative comment and no activity in 1 week, expire
|
# 2. if negative comment and no activity in 1 week, expire
|
||||||
|
|
||||||
import os
|
|
||||||
import paramiko
|
import paramiko
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
@@ -20,16 +20,13 @@
|
|||||||
# remote = https://gerrit.googlesource.com/gerrit
|
# remote = https://gerrit.googlesource.com/gerrit
|
||||||
|
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
import StringIO
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import shlex
|
||||||
|
|
||||||
def run_command(cmd, status=False, env={}):
|
def run_command(cmd, status=False, env={}):
|
||||||
if VERBOSE:
|
|
||||||
print datetime.datetime.now(), "Running:", cmd
|
|
||||||
cmd_list = shlex.split(str(cmd))
|
cmd_list = shlex.split(str(cmd))
|
||||||
newenv = os.environ
|
newenv = os.environ
|
||||||
newenv.update(env)
|
newenv.update(env)
|
||||||
|
@@ -15,16 +15,10 @@
|
|||||||
|
|
||||||
# Add launchpad ids listed in the wiki CLA page to the CLA group in LP.
|
# Add launchpad ids listed in the wiki CLA page to the CLA group in LP.
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import uuid
|
|
||||||
import os
|
import os
|
||||||
import urllib
|
import urllib
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import StringIO
|
|
||||||
import ConfigParser
|
|
||||||
|
|
||||||
from launchpadlib.launchpad import Launchpad
|
from launchpadlib.launchpad import Launchpad
|
||||||
from launchpadlib.uris import LPNET_SERVICE_ROOT
|
from launchpadlib.uris import LPNET_SERVICE_ROOT
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import fcntl
|
import fcntl
|
||||||
import uuid
|
import uuid
|
||||||
import os
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
@@ -42,6 +41,9 @@ from openid.cryptutil import randomString
|
|||||||
|
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
||||||
|
# suppress pyflakes
|
||||||
|
pkg_resources.get_supported_platform()
|
||||||
|
|
||||||
pid_file = '/tmp/update_gerrit_users.pid'
|
pid_file = '/tmp/update_gerrit_users.pid'
|
||||||
fp = open(pid_file, 'w')
|
fp = open(pid_file, 'w')
|
||||||
try:
|
try:
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
# 2. split out the two classes into separate files to be used as a library
|
# 2. split out the two classes into separate files to be used as a library
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
import StringIO
|
import StringIO
|
||||||
import paramiko
|
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_ssh_keys= ["%s %s %s" % ('ssh-%s' % key.keytype.lower(), key.keytext, key.comment) for key in user_data.sshkeys]
|
||||||
user_email= None
|
user_email= None
|
||||||
try:
|
try:
|
||||||
email = user_data.preferred_email_address.email
|
user_email = user_data.preferred_email_address.email
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
query= "insert into account_id (s) values (NULL)"
|
query= "insert into account_id (s) values (NULL)"
|
||||||
|
Reference in New Issue
Block a user