changeset 51:59969aed59fb

py3
author Jeff Hammel <k0scist@gmail.com>
date Tue, 03 Nov 2020 07:33:01 -0800
parents 0c66ca55e336
children b717de8b384f
files buttercup/checkout.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/buttercup/checkout.py	Sun May 11 09:10:29 2014 -0700
+++ b/buttercup/checkout.py	Tue Nov 03 07:33:01 2020 -0800
@@ -30,11 +30,12 @@
         buttercup = Buttercup(srcdir=None)
         sources = source.sources(buttercup.sources)
         for s in sources:
-            print '%s: %s' % (s.directory_name(s.uri), s.uri)
+            print('%s: %s' % (s.directory_name(s.uri), s.uri))
         sys.exit(0)
 
     # setup the src directory in a virtualenv
-    assert 'VIRTUAL_ENV' in os.environ, "You must have a virtualenv activated"
+    if 'VIRTUAL_ENV' in os.environ:
+        raise AssertionError("You must have a virtualenv activated")
     src = os.path.join(os.environ['VIRTUAL_ENV'], 'src')
     if not os.path.exists(src):
         os.mkdir(src)
@@ -45,8 +46,8 @@
     # clone/update the sources
     buttercup.install()
     # install the python
-    if options.setup:        
+    if options.setup:
         buttercup.setup()
 
 if __name__ == '__main__':
-    main() 
+    main()