Skip to content

Commit

Permalink
update f8 / black linting
Browse files Browse the repository at this point in the history
  • Loading branch information
afourmy committed Feb 14, 2023
1 parent 307339b commit b1f92e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions eNMS/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ def save_file(self, filepath, **kwargs):
return content

def save_positions(self, type, id, **kwargs):
now, old_position = vs.get_time(), None
now = vs.get_time()
instance = db.fetch(type, allow_none=True, id=id, rbac="edit")
if not instance:
return
Expand All @@ -1194,10 +1194,8 @@ def save_positions(self, type, id, **kwargs):
new_position = [position["x"], position["y"]]
if "-" not in id:
relation = db.fetch(relation_type, id=id, rbac=None)
old_position = relation.positions.get(instance.name)
relation.positions[instance.name] = new_position
elif id in instance.labels:
old_position = instance.labels[id].pop("positions")
instance.labels[id] = {"positions": new_position, **instance.labels[id]}
return now

Expand Down
7 changes: 2 additions & 5 deletions eNMS/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1296,11 +1296,8 @@ def enter_remote_device(self, connection, device):
for send, expect in commands:
if not send:
continue
self.log(
"info",
f"Sent '{send if password and send != password else 'jump on connect password'}'"
f", waiting for '{expect}'",
)
pwd = send if password and send != password else "jump on connect password"
self.log("info", f"Sent '{pwd}'" f", waiting for '{expect}'")
connection.send_command(
send,
expect_string=expect,
Expand Down

0 comments on commit b1f92e2

Please sign in to comment.