Commits

sodas tsai committed c076cae

Refine code

  • Participants
  • Parent commits 28d8ac6

Comments (0)

Files changed (1)

File beanstalk/tasks/info.py

 import json
 from fabric.api import *
 from ground_soil.fabric import eval_kwargs
+from beanstalk import __version__ as version_str, VERSION as version_list
 
 
 @task
 def version(**kwargs):
     """Get version of beanstalk-stack
     """
-    import beanstalk
     kwargs = eval_kwargs(kwargs)
 
     use_json = kwargs.get('USE_JSON', False)
 
     if use_json:
         print json.dumps({
-            'string': beanstalk.__version__,
-            'list': beanstalk.VERSION,
+            'string': version_str,
+            'list': version_list,
         })
     else:
-        print 'Beanstalk-Stack version {0}'.format(beanstalk.__version__)
+        print 'Beanstalk-Stack version {0}'.format(version_str)