Browse Source

clean up flake8 errors and restore python 2 support

Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 1 year ago
parent
commit
4b6b5bc8bf
1 changed files with 5 additions and 7 deletions
  1. 5
    7
      git_nit/cmd.py

+ 5
- 7
git_nit/cmd.py View File

@@ -16,13 +16,11 @@ from __future__ import print_function
16 16
 
17 17
 import argparse
18 18
 import json
19
-import os
20 19
 import subprocess
21
-import sys
22
-import urllib
23 20
 
24 21
 import pkg_resources
25 22
 import requests
23
+from six.moves import urllib
26 24
 
27 25
 
28 26
 def get_version():
@@ -125,7 +123,7 @@ def main():
125 123
     ]
126 124
     print('Cloning {} into {}'.format(repo, clone_to))
127 125
     print(' '.join(git_cmd))
128
-    subprocess.run(git_cmd, check=True)
126
+    subprocess.check_call(git_cmd)
129 127
 
130 128
     git_cmd = [
131 129
         'git',
@@ -134,7 +132,7 @@ def main():
134 132
     ]
135 133
     print('\nConfiguring git-review')
136 134
     print(' '.join(git_cmd))
137
-    subprocess.run(git_cmd, cwd=clone_to, check=True)
135
+    subprocess.check_call(git_cmd, cwd=clone_to)
138 136
 
139 137
     git_cmd = [
140 138
         'git',
@@ -148,7 +146,7 @@ def main():
148 146
     git_cmd.append(target)
149 147
     print('\nDownloading {}'.format(args.review))
150 148
     print(' '.join(git_cmd))
151
-    subprocess.run(git_cmd, cwd=clone_to, check=True)
149
+    subprocess.check_call(git_cmd, cwd=clone_to)
152 150
 
153 151
     git_cmd = [
154 152
         'git',
@@ -157,7 +155,7 @@ def main():
157 155
     ]
158 156
     print('\nUpdating all remotes')
159 157
     print(' '.join(git_cmd))
160
-    subprocess.run(git_cmd, cwd=clone_to, check=True)
158
+    subprocess.check_call(git_cmd, cwd=clone_to)
161 159
 
162 160
     print('\nPatch ready in {}'.format(clone_to))
163 161
 

Loading…
Cancel
Save