ordering; i like it alphabetically
This commit is contained in:
parent
f5a38c4cac
commit
f2daa3f68d
1 changed files with 15 additions and 15 deletions
|
@ -9,19 +9,6 @@ from pyEDSM.edsm.models import System, Commander
|
|||
|
||||
# ===========================================================================
|
||||
|
||||
def getBodyCount(system):
|
||||
try:
|
||||
bodyCount = System(system).bodyCount
|
||||
except ServerError as e:
|
||||
print(e)
|
||||
sys.exit(1)
|
||||
except NotFoundError as e:
|
||||
print(e)
|
||||
sys.exit(2)
|
||||
else:
|
||||
print(bodyCount)
|
||||
sys.exit(0)
|
||||
|
||||
def distanceBetween(system1, system2):
|
||||
try:
|
||||
coords1 = System(system1).coords
|
||||
|
@ -38,6 +25,19 @@ def distanceBetween(system1, system2):
|
|||
+ (coords1['z']-coords2['z'])**2 ),0)))
|
||||
sys.exit(0)
|
||||
|
||||
def getBodyCount(system):
|
||||
try:
|
||||
bodyCount = System(system).bodyCount
|
||||
except ServerError as e:
|
||||
print(e)
|
||||
sys.exit(1)
|
||||
except NotFoundError as e:
|
||||
print(e)
|
||||
sys.exit(2)
|
||||
else:
|
||||
print(bodyCount)
|
||||
sys.exit(0)
|
||||
|
||||
# ===========================================================================
|
||||
|
||||
parser = argparse.ArgumentParser(description="A collection of tools useful for "
|
||||
|
|
Loading…
Reference in a new issue