Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1939)

Unified Diff: app/models/semantic_version.py

Issue 557683002: Make semantic_version.py usable outside of GAE (Closed) Base URL: https://github.com/dart-lang/pub-dartlang@master
Patch Set: Just use ValueError Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/models/semantic_version.py
diff --git a/app/models/semantic_version.py b/app/models/semantic_version.py
index 6554f9af5986a85c778718cd4497bf9528a4ffb0..dc0b49b2329931ee9718e9897ed5021a8d860ba8 100644
--- a/app/models/semantic_version.py
+++ b/app/models/semantic_version.py
@@ -5,8 +5,6 @@
import re
from functools import total_ordering
-from google.appengine.ext import db
-
@total_ordering
class SemanticVersion(object):
"""A semantic version number. See http://semver.org/."""
@@ -23,8 +21,8 @@ class SemanticVersion(object):
"""Parse a semantic version string."""
match = SemanticVersion._RE.match(version)
- if not match: raise db.BadValueError(
- '"%s" is not a valid semantic version.' % version)
+ if not match:
+ raise ValueError('"%s" is not a valid semantic version.' % version)
self.major = int(match.group(1))
self.minor = int(match.group(2))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698