GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — kale/PR-2529-follow-up ( cf7f09...73a937 )
by
unknown
06:15
created

main()   A

Complexity

Conditions 2

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 2
dl 0
loc 12
rs 9.4285
1
#!/usr/bin/env python
2
3
import shlex
4
import sys
5
import subprocess
6
import lib.datatransformer as transformer
7
8
9
def main(args):
10
    command_list = shlex.split('apt-cache policy ' + ' '.join(args[1:]))
11
    process = subprocess.Popen(command_list, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
12
    command_stdout, command_stderr = process.communicate()
13
    command_exitcode = process.returncode
14
    try:
15
        payload = transformer.to_json(command_stdout, command_stderr, command_exitcode)
16
    except Exception as e:
17
        sys.stderr.write('JSON conversion failed. %s' % str(e))
18
        sys.exit(1)
19
20
    sys.stdout.write(payload)
21
22
if __name__ == '__main__':
23
    main(sys.argv)
24