Skip to content

Commit

Permalink
Fix some typos and missing apostrophes
Browse files Browse the repository at this point in the history
Signed-off-by: Frediano Ziglio <[email protected]>
  • Loading branch information
freddy77 committed Feb 10, 2024
1 parent feeb478 commit 3d733d3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion xcp/net/ifrename/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def load_and_parse(self):
if len(l.strip()) and l.strip()[0] != '#' ]
)

# If the data is empty, dont pass it to json
# If the data is empty, don't pass it to json
if not len( data.strip() ):
return True

Expand Down
6 changes: 3 additions & 3 deletions xcp/net/ifrename/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __rename_nic(nic, name, transactions, cur_state):
else:
# Another nic is in the way for applying the rule. Move it sideways

# Old comment from 2012: given new assertions, will this ever be nessesary?
# Old comment from 2012: given new assertions, will this ever be necessary?
if aliased.kname[:5] == "side-":
aliased_eth = aliased.kname.split('-')[2]
else:
Expand Down Expand Up @@ -371,7 +371,7 @@ def rename( static_rules,
old_state ):
"""
Rename current state based on the rules and past state.
This function sanitises the input and delgates the renaming logic to
This function sanitises the input and delegates the renaming logic to
__rename.
@param static_rules
List of MACPCI objects representing rules
Expand All @@ -384,7 +384,7 @@ def rename( static_rules,
@throws StaticRuleError, CurrentStateError, LastStateError, TypeError
@returns list of tuples of name changes requred
@returns list of tuples of name changes required
"""

if len(static_rules):
Expand Down
2 changes: 1 addition & 1 deletion xcp/net/ifrename/macpci.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"""
MACPCI object.
Used extensivly for interface rename logic.
Used extensively for interface rename logic.
"""

__version__ = "1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion xcp/net/ifrename/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def save(self, header = True):
fd = open_with_codec_handling(self.path, "w")
fd.write(self.write(header))

# else if we were given a file descriptor, just read it
# else if we were given a file descriptor, just write to it
elif self.fd:
self.fd.write(self.write(header))

Expand Down
4 changes: 2 additions & 2 deletions xcp/net/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def ip_link_set_name(src_name, dst_name):
if isup:

# Performace note: if we are doing an intermediate rename to
# move a device sideways, we shouldnt bring it back until it has
# its final name. However, i cant think of a non-hacky way of doing
# move a device sideways, we shouldn't bring it back until it has
# its final name. However, I can't think of a non-hacky way of doing
# this with the current implementation

link_up = Popen(["ip", "link", "set", dst_name, "up"], universal_newlines=True)
Expand Down

0 comments on commit 3d733d3

Please sign in to comment.