Skip to content

Commit

Permalink
Fix AWS checking for localtileserver (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed May 12, 2024
1 parent 83dbede commit ec01504
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions leafmap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6460,12 +6460,15 @@ def is_on_aws():

import psutil

output = psutil.Process().parent().cmdline()

on_aws = False
for item in output:
if item.endswith(".aws") or "ec2-user" in item:
on_aws = True
try:
output = psutil.Process().parent().cmdline()

for item in output:
if item.endswith(".aws") or "ec2-user" in item:
on_aws = True
except:
pass
return on_aws


Expand Down

0 comments on commit ec01504

Please sign in to comment.