Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sivel/speedtest-cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2015-02-26 20:06:42 +0300
committerMatt Martz <matt@sivel.net>2015-02-26 20:06:42 +0300
commit72da41e4fc5a8c49c80f075082887f1190b07171 (patch)
tree0b24993e84c152581ddffc7b9a997532aac12a78
parentcb77da3d37fcf366fe667a03e99a3b72253c0030 (diff)
fix ups for pep8 1.6 changesv0.3.2
-rwxr-xr-xspeedtest_cli.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/speedtest_cli.py b/speedtest_cli.py
index d6657cd..2beeb35 100755
--- a/speedtest_cli.py
+++ b/speedtest_cli.py
@@ -15,13 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-__version__ = '0.3.2'
-
-# Some global variables we use
-user_agent = 'speedtest-cli/%s' % __version__
-source = None
-shutdown_event = None
-
import os
import re
import sys
@@ -31,6 +24,13 @@ import socket
import timeit
import threading
+__version__ = '0.3.2'
+
+# Some global variables we use
+user_agent = 'speedtest-cli/%s' % __version__
+source = None
+shutdown_event = None
+
# Used for bound_interface
socket_socket = socket.socket
@@ -164,9 +164,10 @@ def distance(origin, destination):
dlat = math.radians(lat2 - lat1)
dlon = math.radians(lon2 - lon1)
- a = (math.sin(dlat / 2) * math.sin(dlat / 2) + math.cos(math.radians(lat1))
- * math.cos(math.radians(lat2)) * math.sin(dlon / 2)
- * math.sin(dlon / 2))
+ a = (math.sin(dlat / 2) * math.sin(dlat / 2) +
+ math.cos(math.radians(lat1)) *
+ math.cos(math.radians(lat2)) * math.sin(dlon / 2) *
+ math.sin(dlon / 2))
c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
d = radius * c