diff options
author | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2019-11-24 22:01:31 +0100 |
---|---|---|
committer | Magdalena Grodzińska <mag.grodzinska@gmail.com> | 2019-11-24 22:01:31 +0100 |
commit | 79e77b9feb2453b5b4fabb3b71bc379bbf9e5a08 (patch) | |
tree | 2a52b35e2ba59eb631155b6852c9238ccd4e67e9 /src/main/resources/pl/edu/mimuw/cloudatlas/fetcher | |
parent | e24fbbecfb9b631d9467b204a1b87c593746886b (diff) |
Better dns_names init
Diffstat (limited to 'src/main/resources/pl/edu/mimuw/cloudatlas/fetcher')
-rw-r--r-- | src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/data_fetcher.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/data_fetcher.py b/src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/data_fetcher.py index d53ce05..229a35a 100644 --- a/src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/data_fetcher.py +++ b/src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/data_fetcher.py @@ -64,14 +64,13 @@ def get_data(): kernel_ver = platform.release() logged_users = len(psutil.users()) + dns_names = [] try: external_ip = urllib.request.urlopen('https://ident.me').read().decode('utf8') hostname = socket.gethostbyaddr(external_ip) dns_names = ([hostname[0]] + hostname[1])[:3] except Exception as e: pass - else: - dns_names = [] sys.stdout.write("[{},{},{},{},{},{},{},{},{},{},{},{}]\n".format( avg_load, |