File: main

package info (click to toggle)
kcov 43%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,600 kB
  • sloc: cpp: 12,617; ansic: 2,379; python: 2,001; sh: 333; makefile: 133; javascript: 65; xml: 7; asm: 4
file content (30 lines) | stat: -rwxr-xr-x 547 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python3

import sys
import second

def fn():
    print("hello!")
    return

def loop_fn():
    for i in range(0,10):
        print("NR %d" % (i))

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Need at least one arg")
        sys.exit(1)

    fn()
    print("in main, but will return soon")
    second.second_fn(int(sys.argv[1]))

    try:
        if int(sys.argv[1]) > 10:
            raise Exception("metallgutten")
    except:
        print("Got an exception")

    loop_fn()
    sys.exit(int(sys.argv[1]))