Skip to content

Commit

Permalink
fix long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
grybak-arista committed Oct 30, 2015
1 parent 70a0791 commit 9813956
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pyeapi/api/vrrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,21 +1050,25 @@ def set_tracks(self, name, vrid, tracks, run=True):
for track in remove:
match = re.match(r'(\S+)\s+(\S+)\s+(\S+)', track)
if match:
(tr_obj, action, amount) = (match.group(1), match.group(2), match.group(3))
(tr_obj, action, amount) = \
(match.group(1), match.group(2), match.group(3))

if amount == unset:
amount = ''
t_cmd = "no vrrp %d track %s %s %s" % (vrid, tr_obj, action, amount)
t_cmd = ("no vrrp %d track %s %s %s"
% (vrid, tr_obj, action, amount))
cmds.append(t_cmd.rstrip())

for track in add:
match = re.match(r'(\S+)\s+(\S+)\s+(\S+)', track)
if match:
(tr_obj, action, amount) = (match.group(1), match.group(2), match.group(3))
(tr_obj, action, amount) = \
(match.group(1), match.group(2), match.group(3))

if amount == unset:
amount = ''
t_cmd = "vrrp %d track %s %s %s" % (vrid, tr_obj, action, amount)
t_cmd = ("vrrp %d track %s %s %s"
% (vrid, tr_obj, action, amount))
cmds.append(t_cmd.rstrip())

cmds = sorted(cmds)
Expand Down

0 comments on commit 9813956

Please sign in to comment.