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:
parent
3c660d675e
commit
aae2f80fdd
@ -11,7 +11,7 @@
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os, datetime
|
||||
import datetime
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
|
@ -29,7 +29,6 @@
|
||||
|
||||
import github2.client
|
||||
import os
|
||||
import StringIO
|
||||
import ConfigParser
|
||||
import logging
|
||||
import re
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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)"
|
||||
|
@ -19,10 +19,8 @@ import os
|
||||
import argparse
|
||||
import hashlib
|
||||
import yaml
|
||||
import sys
|
||||
import xml.etree.ElementTree as XML
|
||||
from xml.dom import minidom
|
||||
import pycurl
|
||||
import jenkins
|
||||
import ConfigParser
|
||||
from StringIO import StringIO
|
||||
|
@ -42,7 +42,7 @@ class publisher_tarball(object):
|
||||
btrigger_config = XML.SubElement(btrigger_configs, 'hudson.plugins.parameterizedtrigger.BuildTriggerConfig')
|
||||
configs = XML.SubElement(btrigger_config, 'configs')
|
||||
parameters = XML.SubElement(configs, 'hudson.plugins.parameterizedtrigger.PredefinedBuildParameters')
|
||||
properties = XML.SubElement(parameters, 'properties').text = 'BUILD_SELECTOR=<SpecificBuildSelector><buildNumber>$BUILD_NUMBER</buildNumber></SpecificBuildSelector>\n\
|
||||
XML.SubElement(parameters, 'properties').text = 'BUILD_SELECTOR=<SpecificBuildSelector><buildNumber>$BUILD_NUMBER</buildNumber></SpecificBuildSelector>\n\
|
||||
BRANCH=$GERRIT_REFNAME'
|
||||
XML.SubElement(btrigger_config, 'projects').text = '{proj}-ppa'.format(proj=self.data['main']['project'])
|
||||
XML.SubElement(btrigger_config, 'condition').text = 'SUCCESS'
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
from subprocess import *
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
p = Popen(["ping", sys.argv[1]], stdout=PIPE)
|
||||
while True:
|
||||
|
Loading…
x
Reference in New Issue
Block a user