~bkerensa/ubuntu-dev-tools/fix-for-1068049

« back to all changes in this revision

Viewing changes to ubuntutools/misc.py

  • Committer: Benjamin Drung
  • Date: 2010-12-27 21:33:01 UTC
  • Revision ID: bdrung@ubuntu.com-20101227213301-gel9jfew0v1xj15k
Fix invalid name pylint report.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    if _system_distribution is None:
41
41
        try:
42
42
            if os.path.isfile('/usr/bin/dpkg-vendor'):
43
 
                p = Popen(('dpkg-vendor', '--query', 'vendor'), stdout=PIPE)
 
43
                process = Popen(('dpkg-vendor', '--query', 'vendor'),
 
44
                                stdout=PIPE)
44
45
            else:
45
 
                p = Popen(('lsb_release', '-cs'), stdout=PIPE)
46
 
            output = p.communicate()[0]
 
46
                process = Popen(('lsb_release', '-cs'), stdout=PIPE)
 
47
            output = process.communicate()[0]
47
48
        except OSError:
48
49
            print ('Error: Could not determine what distribution you are '
49
50
                   'running.')
50
51
            return None
51
 
        if p.returncode != 0:
 
52
        if process.returncode != 0:
52
53
            print 'Error determininng system distribution'
53
54
            return None
54
55
        _system_distribution = output.strip()
95
96
 
96
97
    return items
97
98
 
98
 
def splitReleasePocket(release):
 
99
def split_release_pocket(release):
99
100
    '''Splits the release and pocket name.
100
101
 
101
102
    If the argument doesn't contain a pocket name then the 'Release' pocket
128
129
def dsc_url(mirror, component, package, version):
129
130
    "Build a source package URL"
130
131
    group = package[:4] if package.startswith('lib') else package[0]
131
 
    fn = dsc_name(package, version)
132
 
    return os.path.join(mirror, 'pool', component, group, package, fn)
 
132
    filename = dsc_name(package, version)
 
133
    return os.path.join(mirror, 'pool', component, group, package, filename)