File: vendor.py

package info (click to toggle)
python-asusrouter 1.21.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,856 kB
  • sloc: python: 20,497; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 482 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Vendor module."""


def replace_vendor(vendor: str) -> str:
    """Replace vendor name."""

    # Check if vendor is any of `android-dhcp-XX` where XX is a version number
    if vendor.startswith("android-dhcp-"):
        # Get the version number
        version = vendor.replace("android-dhcp-", "")
        # Return the version number
        return f"Android {version}"

    match vendor:
        case "MSFT 5.0":
            return "Microsoft Corporation"

    return vendor