22import subprocess
33import sys
44from os .path import exists
5+
56GET_MAINTAINER_PATH = "./scripts/get_maintainer.pl"
67if not exists (GET_MAINTAINER_PATH ):
78 raise Exception (f"Can't find { GET_MAINTAINER_PATH } , "
8- "are you in linux directory?"
9- )
9+ "are you in linux directory?" )
1010
1111argv = sys .argv
1212if len (argv ) < 2 :
@@ -15,12 +15,12 @@ if argv[1][-6:] != '.patch':
1515 raise Exception ("Need .patch file (check arg)" )
1616cmd = [f"{ GET_MAINTAINER_PATH } " , argv [1 ]]
1717try :
18- result = subprocess .run (cmd , stdout = subprocess .PIPE ,
18+ result = subprocess .run (cmd ,
19+ stdout = subprocess .PIPE ,
1920 stderr = subprocess .PIPE )
2021except :
2122 print (f"subprocess.run failure... "
22- "Potentially lacking permissions for {GET_MAINTAINER_PATH}"
23- )
23+ "Potentially lacking permissions for {GET_MAINTAINER_PATH}" )
2424
2525get_maintainer_output = result .stdout .decode ('UTF-8' )
2626get_maintainer_errors = result .stderr .decode ('UTF-8' )
@@ -31,9 +31,9 @@ lines = []
3131for line in get_maintainer_output .split ('\n ' )[:- 1 ]:
3232 line = line .strip ()
3333 idx_of_paren = line .index ('(' )
34- before = line [0 :idx_of_paren - 1 ]
34+ before = line [0 :idx_of_paren - 1 ]
3535 before = before .replace ('"' , '' )
36- after = line [idx_of_paren + 1 :- 1 ]
36+ after = line [idx_of_paren + 1 :- 1 ]
3737 lines .append ((before , after ))
3838
3939TO = '--to '
0 commit comments