2to3 -f print
[sfa.git] / sfa / rspecs / versions / ofeliav1.py
index cd206ff..ff4ae42 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
+from __future__ import print_function
+
 from copy import deepcopy
 from lxml import etree
 
@@ -86,7 +88,8 @@ class Ofelia(RSpecVersion):
 
     # Slivers
    
-    def add_slivers(self, hostnames, attributes=[], sliver_urn=None, append=False):
+    def add_slivers(self, hostnames, attributes=None, sliver_urn=None, append=False):
+        if attributes is None: attributes=[]
         # add slice name to network tag
         network_tags = self.xml.xpath('//network')
         if network_tags:
@@ -230,7 +233,7 @@ if __name__ == '__main__':
     import pprint
     from sfa.rspecs.rspec import RSpec
     from sfa.rspecs.rspec_elements import *
-    print "main ofeliav1"
+    print("main ofeliav1")
     if len(sys.argv)!=2:
         r = RSpec('/tmp/resources.rspec')
     else: