m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMagdalena GrodziƄska <mag.grodzinska@gmail.com>2019-11-24 22:10:17 +0100
committerGitHub <noreply@github.com>2019-11-24 22:10:17 +0100
commit682cf4e6737b4125db2f6acba6804394c0d309f8 (patch)
tree8f9487bb2aa2911ec6ad1a93bab306a8ec324a21 /src/main
parentac7aa67be63bea11246b5d39d1ff2bd7d16d2a1c (diff)
parent79e77b9feb2453b5b4fabb3b71bc379bbf9e5a08 (diff)
Merge pull request #40 from m-chrzan/one_more_for_fetcher
Better dns_names init
Diffstat (limited to 'src/main')
-rw-r--r--src/main/resources/pl/edu/mimuw/cloudatlas/fetcher/data_fetcher.py3
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,