Skip to content

Commit

Permalink
post_deploy.regenerate_all: assume previous_version is non-None
Browse files Browse the repository at this point in the history
Save us the trouble of 1) checking previous_version and 2) storing the
tuple in a variable.

Most of the functions in the post_deploy_tasks queue don't bother
checking previous_version and assume it's a valid VersionInfo instance
anyway.
  • Loading branch information
rctay authored and Arachnid committed Feb 3, 2011
1 parent f41f551 commit 6fe99eb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions post_deploy.py
Expand Up @@ -51,13 +51,11 @@ def generate(previous_version):


def regenerate_all(previous_version):
if previous_version:
ver_tuple = (
previous_version.bloggart_major,
previous_version.bloggart_minor,
previous_version.bloggart_rev,
)
if ver_tuple < BLOGGART_VERSION:
if (
previous_version.bloggart_major,
previous_version.bloggart_minor,
previous_version.bloggart_rev,
) < BLOGGART_VERSION:
regen = PostRegenerator()
deferred.defer(regen.regenerate)

Expand Down

0 comments on commit 6fe99eb

Please sign in to comment.