remove deprecated listresources code
authorsmbaker <smbaker@fc8clean.lan>
Tue, 27 Sep 2011 17:54:35 +0000 (10:54 -0700)
committersmbaker <smbaker@fc8clean.lan>
Tue, 27 Sep 2011 17:54:35 +0000 (10:54 -0700)
sface/config.py
sface/sfidata.py
sface/sfiprocess.py
sface/sfirenew.py

index 8333312..c475e76 100644 (file)
@@ -189,13 +189,6 @@ class Config:
 
     def getAuthorityRecordFile(self): return self.fullpath ("%s/%s.record" % self.getAuthority())
 
 
     def getAuthorityRecordFile(self): return self.fullpath ("%s/%s.record" % self.getAuthority())
 
-    def getAuthorityListRecordFile(self, i=None):
-        # DEPRECATED
-        if (i != None) and (i != 0):
-            return self.fullpath ("%s_list.record.%d" % (self.getAuthority(),i))
-        else:
-            return self.fullpath ("%s_list.record" % self.getAuthority())
-
     def getAuthorityListFile(self):
         return self.fullpath ("%s_list.xml" % self.getAuthority())
 
     def getAuthorityListFile(self):
         return self.fullpath ("%s_list.xml" % self.getAuthority())
 
index aa613c9..7b52b56 100644 (file)
@@ -6,31 +6,12 @@ from lxml import etree
 from sfa.util.record import SfaRecord, SliceRecord, AuthorityRecord
 from sfa.rspecs.rspec_parser import parse_rspec
 from sface.config import config
 from sfa.util.record import SfaRecord, SliceRecord, AuthorityRecord
 from sfa.rspecs.rspec_parser import parse_rspec
 from sface.config import config
-from distutils.version import LooseVersion
-from sfa.util.version import version_core
 
 class SfiData:
     def __init__(self):
         pass
 
 
 class SfiData:
     def __init__(self):
         pass
 
-    def getAuthorityHrns_old(self, type=None):
-        # DEPRECATED
-        names = []
-        i=0
-        while os.path.exists(config.getAuthorityListRecordFile(i)):
-            rec_file = config.getAuthorityListRecordFile(i)
-            xml = open(rec_file).read()
-            rec = SfaRecord(string = xml)
-            if (type==None) or (type==rec.get_type()):
-                names.append(rec.get_name())
-            i=i+1
-
-        return names
-
     def getAuthorityHrns(self, type=None):
     def getAuthorityHrns(self, type=None):
-        if LooseVersion(version_core()['code_tag']) <= LooseVersion("1.0-35"):
-            return self.getAuthorityHrns_old(type)
-
         names = []
         if os.path.exists(config.getAuthorityListFile()):
             xml = open(config.getAuthorityListFile()).read()
         names = []
         if os.path.exists(config.getAuthorityListFile()):
             xml = open(config.getAuthorityListFile()).read()
index ee49eb7..c5a056b 100644 (file)
@@ -3,9 +3,6 @@ import os
 import sys
 import time
 
 import sys
 import time
 
-from distutils.version import LooseVersion
-from sfa.util.version import version_core
-
 from PyQt4.QtCore import *
 from sface.config import config
 from sface.xmlrpcwindow import get_tracker, XmlrpcReader
 from PyQt4.QtCore import *
 from sface.config import config
 from sface.xmlrpcwindow import get_tracker, XmlrpcReader
@@ -141,14 +138,10 @@ class SfiProcess(QObject):
 
     def listRecords(self, hrn, rectype=None, filename=None):
         args = ["-u", config.getUser(), "-a", config.getAuthority(),
 
     def listRecords(self, hrn, rectype=None, filename=None):
         args = ["-u", config.getUser(), "-a", config.getAuthority(),
-                "-r", config.getRegistry(), "-s", config.getSlicemgr(), "list", hrn]
+                "-r", config.getRegistry(), "-s", config.getSlicemgr(), "list", "-F", "xmllist", hrn]
 
         if not filename:
 
         if not filename:
-            if LooseVersion(version_core()['code_tag']) <= LooseVersion("1.0-35"):
-                # DEPRECATED
-                filename = config.getAuthorityListRecordFile()
-            else:
-                filename = config.getAuthorityListFile()
+            filename = config.getAuthorityListFile()
 
         # we can't tell whether SFI will create one file or many, so delete
         # leftovers from last time, then we'll know what we got, after we get it.
 
         # we can't tell whether SFI will create one file or many, so delete
         # leftovers from last time, then we'll know what we got, after we get it.
index a4dd1b3..dda2652 100644 (file)
@@ -200,7 +200,7 @@ class RenewWindow(QDialog):
         self.process = SfiProcess(self)
         self.connect(self.process, SIGNAL('finished()'), self.getAuthorityRecordFinished)
 
         self.process = SfiProcess(self)
         self.connect(self.process, SIGNAL('finished()'), self.getAuthorityRecordFinished)
 
-        self.process.listRecords(config.getAuthority(), None, config.getAuthorityListFile())
+        self.process.listRecords(config.getAuthority(), None)
         self.setStatus("Refreshing slice list. This will take a moment...")
 
     def getAuthorityRecordFinished(self):
         self.setStatus("Refreshing slice list. This will take a moment...")
 
     def getAuthorityRecordFinished(self):