Skip to content

Conversation

@newwlfz
Copy link

@newwlfz newwlfz commented Nov 28, 2025

Problem Description

Fix a TypeError that occurred during NPK version validation in Python 3 environments.

Changes Made

  • Converted map object to tuple before comparison in pynetinstall/flash.py
  • Prevents "'>' not supported between instances of 'map' and 'tuple'" error

Impact

  • Eliminates crashes during version compatibility checks
  • Ensures reliable firmware validation across different Python 3 versions

问题描述

修复Python 3中NPK版本比较时的TypeError。

修改内容

  • 在pynetinstall/flash.py中将map对象转换为tuple进行比较
  • 修复"> not supported between instances of 'map' and 'tuple'"错误

影响范围

  • 消除版本兼容性检查时的崩溃
  • 确保在不同Python 3版本中可靠地进行固件验证

- Fix console_scripts entry point in setup.py to point to pynetinstall.__main__:main
- Encapsulate main execution logic into main() function in pynetinstall/__main__.py
- Update README.md Usage section to reflect correct command line usage
- Convert map object to tuple before comparison to fix TypeError
- This prevents '>' not supported between instances of 'map' and 'tuple' error
- Affects NPK version comparison in Python 3
@newwlfz newwlfz closed this Dec 1, 2025
@newwlfz newwlfz reopened this Dec 4, 2025
@uedvt359
Copy link
Collaborator

uedvt359 commented Dec 4, 2025

thanks! i'll take a look at both of your PRs when i find time for it, asap. you accidentally added the "Fix: Invalid script entry point in setup.py" commit to this PR too. please rebase.

@newwlfz
Copy link
Author

newwlfz commented Dec 4, 2025

thanks! i'll take a look at both of your PRs when i find time for it, asap. you accidentally added the "Fix: Invalid script entry point in setup.py" commit to this PR too. please rebase.

You're very welcome! I apologize for previously submitting multiple adjustment projects together. I have now separated them and submitted them individually.
Thank you for your patience with a programming beginner.

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