mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-04 05:05:19 +08:00
log upload: ignore error if we cannot get git email, really be quiet with -q except for printing the URL in the end
This commit is contained in:
+8
-2
@@ -50,7 +50,11 @@ def ask_value(text, default=None):
|
|||||||
|
|
||||||
def get_git_email():
|
def get_git_email():
|
||||||
""" get (globally) configured git email """
|
""" get (globally) configured git email """
|
||||||
output = subprocess.check_output(["git", "config", "--global", "user.email"])
|
try:
|
||||||
|
output = subprocess.check_output(["git", "config", "--global", "user.email"])
|
||||||
|
except Exception:
|
||||||
|
return ""
|
||||||
|
|
||||||
return output.decode("utf-8").replace('\n', '')
|
return output.decode("utf-8").replace('\n', '')
|
||||||
|
|
||||||
|
|
||||||
@@ -92,7 +96,9 @@ def main():
|
|||||||
'feedback': feedback, 'email': email}
|
'feedback': feedback, 'email': email}
|
||||||
|
|
||||||
for file_name in args.FILE:
|
for file_name in args.FILE:
|
||||||
print('Uploading '+file_name+'...')
|
if not quiet:
|
||||||
|
print('Uploading '+file_name+'...')
|
||||||
|
|
||||||
with open(file_name, 'rb') as f:
|
with open(file_name, 'rb') as f:
|
||||||
r = requests.post(UPLOAD_URL, data=payload, files={'filearg': f},
|
r = requests.post(UPLOAD_URL, data=payload, files={'filearg': f},
|
||||||
allow_redirects=False)
|
allow_redirects=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user