wbond/sublime_package_control — pull request #325 by lxe (2013-02-05 19:25:25+00:00)
Title: Version string in package-metadata.json causes crash.

Attempting to install packages causes this error:

```
Traceback (most recent call last):
File "X/threading.py", line 639, in _bootstrap_inner
File "/Users/lxe/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/commands/install_package_command.py", line 42, in run
'reinstall', 'pull', 'none'])
File "/Users/lxe/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/package_installer.py", line 120, in make_package_list
installed_version, download['version'])
File "/Users/lxe/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/package_manager.py", line 147, in compare_versions
cv1 = cmp_compat(version1)
File "/Users/lxe/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/package_manager.py", line 140, in cmp_compat
return [int(x) for x in re.sub(r'(\.0+)*$', '', v).split(".")]
File "/Users/lxe/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/package_manager.py", line 140, in
return [int(x) for x in re.sub(r'(\.0+)*$', '', v).split(".")]
ValueError: invalid literal for int() with base 10: '0-alpha2'
```

I changed the version string to 2.0.0.2. Either that or change the version parsing code. This was easier I think.