X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Frspecs%2Fpg_rspec_converter.py;h=7de30efd988da896863b4adb18f3d5cc274f230e;hb=3e6097e2d50ff322b45f53fcb22d07fc16adbdb6;hp=e060f3e62f813c1803cff20fc66c2a79171f9837;hpb=274bc032ef4e38815d86e94e29fd602f29aa5829;p=sfa.git diff --git a/sfa/rspecs/pg_rspec_converter.py b/sfa/rspecs/pg_rspec_converter.py index e060f3e6..7de30efd 100755 --- a/sfa/rspecs/pg_rspec_converter.py +++ b/sfa/rspecs/pg_rspec_converter.py @@ -1,11 +1,14 @@ -#!/usr/bin/python +#!/usr/bin/python +from __future__ import print_function + from lxml import etree -from StringIO import StringIO -from sfa.util.xrn import * -from sfa.rspecs.pg_rspec import PGRSpec -from sfa.rspecs.sfa_rspec import SfaRSpec +from sfa.util.xrn import Xrn, urn_to_hrn +from sfa.rspecs.rspec import RSpec +from sfa.rspecs.version_manager import VersionManager + +from sfa.util.py23 import StringIO -xslt=''' +xslt = ''' @@ -28,42 +31,70 @@ xslt=''' 1: - print PGRSpecConverter.to_sfa_rspec(sys.argv[1]) + if len(sys.argv) > 1: + print(PGRSpecConverter.to_sfa_rspec(sys.argv[1]))