Skip to content

Commit

Permalink
upgrading to python3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Naor Livne committed Feb 17, 2019
1 parent 438ea32 commit c28ce69
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: python
dist: xenial
python:
- "2.7"
- "3.7"
install:
- pip install -r requirements.txt
script:
Expand Down
Binary file modified dist/nebulactl
Binary file not shown.
10 changes: 5 additions & 5 deletions nebulactl.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python3.7
import click, json, ast, os, base64
from NebulaPythonSDK import Nebula
from os.path import expanduser

VERSION = "2.0.2"
VERSION = "2.1.0"


# i'm separating the nebulactl.py to 2 parts, the first is the NebulaCall class below which is going to be in charge of
Expand Down Expand Up @@ -82,7 +82,7 @@ def list_app_info(self, app):
reply = self.connection.list_app_info(app)
reply_json = reply["reply"]
if reply["status_code"] == 200:
for key, value in reply_json.items():
for key, value in list(reply_json.items()):
click.echo(str(key) + ": " + json.dumps(value))
else:
click.echo(click.style("error listing " + app
Expand Down Expand Up @@ -142,7 +142,7 @@ def list_device_group(self, device_group):
reply = self.connection.list_device_group(device_group)
reply_json = reply["reply"]
if reply["status_code"] == 200:
for key, value in reply_json.items():
for key, value in list(reply_json.items()):
click.echo(str(key) + ": " + json.dumps(value))
else:
click.echo(click.style("error listing device_group :" + device_group
Expand All @@ -152,7 +152,7 @@ def list_device_groups(self):
reply = self.connection.list_device_groups()
reply_json = reply["reply"]
if reply["status_code"] == 200:
for key, value in reply_json.items():
for key, value in list(reply_json.items()):
click.echo(str(key) + ": " + json.dumps(value))
else:
click.echo(click.style("error listing device_groups, are you logged in?", fg="red"))
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ dis3==0.1.3
future==0.17.1
idna==2.8
macholib==1.11
NebulaPythonSDK==2.0.2
NebulaPythonSDK==2.1.1
pefile==2018.8.8
PyInstaller==3.4
requests==2.21.0
six==1.12.0
urllib3==1.24.1

0 comments on commit c28ce69

Please sign in to comment.