Skip to content

Commit

Permalink
Collection exceptions for DTDoctor
Browse files Browse the repository at this point in the history
  • Loading branch information
ayjayt committed Sep 27, 2024
1 parent 2a0b15a commit 00eb56e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions devtools/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ def write_json(self, obj):
return key

def diagnose():
fail = []
print("*".center(50, "*"))
print("Collecting information about the system:".center(50, "*"))
print(platform.system())
Expand All @@ -607,8 +608,8 @@ def diagnose():
print(subprocess.check_output(["git", "describe", "--all", "--tags", "--long", "--always",]))
print(sys.version)
print(sys.version_info)
except BaseException:
pass
except BaseException as e:
fail.append(e)
finally:
print("Done with version info.".center(50, "*"))
pass
Expand All @@ -619,7 +620,7 @@ def diagnose():
time.sleep(2)
browser.close()
except BaseException:
pass
fail.append(e)
finally:
print("Done with sync test".center(50, "*"))

Expand All @@ -629,12 +630,16 @@ async def test():
await browser.close()
try:
print("Running Asyncio Test".center(50, "*"))
#asyncio.run(test())
print("Skipped...")
asyncio.run(test())
except BaseException:
pass
fail.append(e)
finally:
print("Asyncio.run done".center(50, "*"))
pass
print("")
sys.stdout.flush()
sys.stderr.flush()
for exception in fail:
print(str(exception))
if fail: raise BaseException("There was an exception, see above.")
print("Thank you! Please share these results with us!")

0 comments on commit 00eb56e

Please sign in to comment.