From 8cacfb1407d6458661d9d0e5e00c0253e30bb23e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 4 Apr 2013 15:30:42 -0400 Subject: fix head only when there's no rev... --- alembic/command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alembic/command.py') 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", -- cgit v1.2.1