diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-04 15:30:42 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-04 15:30:42 -0400 |
commit | 8cacfb1407d6458661d9d0e5e00c0253e30bb23e (patch) | |
tree | 8887b81a69eeb88cea5ec5e18ae62aa764f0367e /alembic | |
parent | 56adcd052f06feff560ff00df019657d578e0ccd (diff) | |
download | alembic-8cacfb1407d6458661d9d0e5e00c0253e30bb23e.tar.gz |
fix head only when there's no rev...
Diffstat (limited to 'alembic')
-rw-r--r-- | alembic/command.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alembic/command.py b/alembic/command.py index 35a4eae..aad9691 100644 --- a/alembic/command.py +++ b/alembic/command.py @@ -178,8 +178,8 @@ def current(config, head_only=False): if head_only: config.print_stdout("%s%s" % ( - rev.revision, - " (head)" if rev.is_head else "")) + rev.revision if rev else None, + " (head)" if rev and rev.is_head else "")) else: config.print_stdout("Current revision for %s: %s", |