Skip to content

move to use max instead of if else in length, use list comprehension to simplify for loops - #95

Open
galrock wants to merge 6 commits into
MrBr-github:masterfrom
galrock:gal
Open

move to use max instead of if else in length, use list comprehension to simplify for loops #95
galrock wants to merge 6 commits into
MrBr-github:masterfrom
galrock:gal

Conversation

@galrock

@galrock galrock commented Apr 3, 2023

Copy link
Copy Markdown

No description provided.

Comment thread lshca/lshca.py Outdated
self.output.append(data)

def __add__(self,data):
self.output.append(data)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need it here?

Comment thread lshca/lshca.py Outdated

# based on https://docs.mellanox.com/pages/viewpage.action?pageId=43714202#LinkLayerDiscoveryProtocol(LLDP)-lldptimer
lldp_capture_timeout = 35 # seconds. Based on default 30s value in Mellanox Onyx OS

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with this section, please remove

Comment thread lshca/lshca.py Outdated
port_count = 1

while True:
while True and port_count < len(bdf_dev.port_list):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The introduced change has different functionality from existing code

@galrock galrock changed the title some changes move to use max instead of if else in length, use list comprehension to simplify for loops Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants