Skip to content

Commit

Permalink
Assume that a bunch of digits in a version number is a timestamp
Browse files Browse the repository at this point in the history
This ensures that the behavior of the timestamp test doesn't change on
January 1st and doesn't depend on the time zone.
  • Loading branch information
dashea committed Feb 12, 2015
1 parent 043fd56 commit 33bcc64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyanaconda/packaging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ def _getReleaseVersion(self, url):
except ConfigParser.Error:
pass

if version.startswith(time.strftime("%Y")):
# If the version looks like a timestamp, assume it's rawhide
# plz change before Fedora version 9999999
if version[:8].isdigit():
version = "rawhide"

log.debug("got a release version of %s", version)
Expand Down

0 comments on commit 33bcc64

Please sign in to comment.